1,633 Topics

Member Avatar for
Member Avatar for Vandithar

Hi, I have a string like this: [code] $string="Lake City 84132, USA. FAU - Carrell, D T AU - Carrell DT FAU - Emery, B R AU - Emery BR"; [/code] I want to extract AU and only its contents. The output should be like this: [code] AU - Carrell …

Member Avatar for katharnakh
0
102
Member Avatar for perlguy

I'm trying to append a string to an array value and it doesn't seem to be working. Can someone tell me what I'm doing wrong? The array values will be URLs with a trailing forward slash. [url]http://www.mywebsite.com/Details/product-type/New-York-293486/[/url] $values[10] .= '?cid=spontrue';

Member Avatar for KevinADC
0
120
Member Avatar for kenji

Hey, I have used the LWP:\:Simple module and saved the source of a website in a file. I am trying to extract all the data between the <head> tags and pass it to a variable to process. So far I can't seem to extract the data properly. Any suggestions? [code=Perl] …

Member Avatar for KevinADC
0
164
Member Avatar for yssirhc

I have a web page that prints information from a database based on the query string variables. Sometimes the page loads just fine and other times it gives the message "Use of uninitialized value" for every single one of my database variables. The times it gives this message seem to …

Member Avatar for katharnakh
0
151
Member Avatar for anewhope

I am in the process of learning perl to go along with web design. I am trying to learn perl, ajax, css, xhtml, and javascript. If anyone can help me out, please let me know. thanks

Member Avatar for Xlphos
0
57
Member Avatar for gsarin

Hi, I am trying to run a Perl-CGI script through Tomcat Server and running into issues. The script runs fine through command prompt and also runs half through webpage. The problem comes when I try to access some files in directories located on some other server. I think tomcat security …

Member Avatar for gsarin
0
445
Member Avatar for Mchelle610
Member Avatar for mitchems
0
91
Member Avatar for LSU_223

Hi - Major novice here. I'm trying to write a code that starts with a user defined number (lets say "N"), picks a random number between 1 and N (lets say "R"), pushes R onto an array, subtracts R from N, then picks the next random number from (N-R), pushes …

Member Avatar for LSU_223
0
185
Member Avatar for santhanalakshmi

Hi, open(MYINPUTFILE, "<access.log"); while(<MYINPUTFILE>) { # Good practice to store $_ value because # subsequent operations may change it. my($line) = $_; # Good practice to always strip the trailing # newline from the line. chomp($line); my($time, $elapsed, $remotehost, $csp, $bytes, $method, $url, $user) = split(' ', $line); # Print …

Member Avatar for santhanalakshmi
0
160
Member Avatar for musturd

[code=perl]#!/usr/bin/perl use warnings; use strict; push @INC, "C:/Perl/Modules"; print "What is current download directory? "; my $dir = <STDIN>; opendir DH, $dir or die "Can't open directory..."; my $parent = $_; while ($parent = readdir(DH)) { next if $parent eq "." or $parent eq ".."; if(-d $parent) { opendir DI, …

Member Avatar for musturd
0
188
Member Avatar for rana03

Hi, I am working on a assignment where I have results sheet which is in form of text file; I want text file content to be written in excel sheet; generally we manually copy and paste the results in excel sheet. Our existing excel sheet has 70(sub-sheets) e.g result of …

Member Avatar for mitchems
0
186
Member Avatar for dolly37

Hi all, I want to write a perl script which will parse a .cpp file to extract the member variables of a function and log them into a text file. Then I have to read this file using Tk and display the contents of the file. I have the perl …

0
68
Member Avatar for rana03

Hi, Can somebody let me know how to check whether particular network drive is mapped or not e.g x:\\share1\share2? Regards, Rana

Member Avatar for rana03
0
227
Member Avatar for mysouthcity

I need help writing a Perl script that check and validate the information entered by users into an HTML form. Once the information is correct you will add the information validated into a database.

Member Avatar for KevinADC
0
49
Member Avatar for orwell84

I'm having a problem with the substr function. I want it to be dynamic in a for loop as follows: [code="perl"] for ($i = substr $bin, $sub, 1 ; $sub < $len2 ; $sub++){ [/code] You can probably guess what this code is meant to do. I want to read …

Member Avatar for orwell84
0
307
Member Avatar for goodluck4287

Hi everyone, working on a class project where we spider some patents from the USPTO (Patent office) and eventually map out our findings. Our teacher provided a script and expected us to hardwire directly to a modem, not a router. That is asking a lot since I need to provide …

Member Avatar for Fest3er
0
194
Member Avatar for babno

I need to add elements in the middle of a user created array. The closest I found was splice, but from what I read it can only replace. example of what I want to do it take list monkey marble oreo sandle monkey marble smile phone oreo sandle

Member Avatar for babno
0
2K
Member Avatar for qaokpl

I'am trying to build a website and I want to make some things auto mated. I only know html nothing else. A freind of mine make a site similer to what I'am doing but used perl. I want to know more and I can't tlak to this guy anymore.

Member Avatar for ghostdog74
0
162
Member Avatar for sprok

Hello, I have this code of converting hexadecimal value to decimal but getting a warning at compilation. I'm starting to learn Perl and this one really makes me - almost - crazy! :) --- [code=perl] #!/usr/bin/perl use strict; use warnings; my $decVal; print "Please enter a hexadecimal value to be …

Member Avatar for sprok
0
585
Member Avatar for Debangana

Hi I am trying to ftp files from a windows server to a unix machine. When I login with the required credentials into the windows server , I want to make sure that the login directory is the correct one else I should change directory before initiating the ftp process. …

Member Avatar for ghostdog74
0
116
Member Avatar for solocky

Hello all i am in ned of help with getting a cgi script to output to a flat file with out the use of a cron job whis is what ive ben using as such perl /[path to cgi file]/vfx.cgi > /[path to plx folder]/vfx.txt can i add a line …

Member Avatar for KevinADC
0
84
Member Avatar for Debangana

Hi I have written a ftp script in perl.It seems to work fine but for some servers it throws an error "Bad file number" while trying to close the connection.What can be the reason for this?How should I resolve it? Following is the ftp section from my code: [code]if (!$ftp->get($ftp_FileList, …

Member Avatar for Debangana
0
231
Member Avatar for isomillennium

Hi all , just learned the basics of perl thru a website. and i was just wondering what the perl equivalent of php code .... for($i = 0; $i < 10; $i++) { $myarray[] = $i; } would be. Any help appreciated thank you ..

Member Avatar for isomillennium
0
52
Member Avatar for sid78669

Can some suggest a good way to cleanup the HTML that is output when a perl script is run using the CGI module? I tried to install HTML::Tidy, but couldn't as i was missing libtidy. And I don't want to go through 700 lines of code and putting up loads …

Member Avatar for sid78669
0
78
Member Avatar for sid78669

Hello everyone, This question is in regards to the HTML::TreeBuilder module in perl. I am using it to extract meta tags from website contents. It was working fine until i tried to extract meta tags from [URL="http://www.audicanada.ca/audi/ca/language_selector.html"]http://www.audicanada.ca/audi/ca/language_selector.html[/URL] This site contains all the meta tags that i need, author, keywords, description. …

0
54
Member Avatar for arya6000

Hello If we have code like this [CODE]$content =~ m/test/;[/CODE] than it will return true or false, but how can I put a match of a regex into a scalar instead of it returning true or false? Thank You

Member Avatar for KevinADC
0
74
Member Avatar for rana03

Hi I want to map a network drive on Windows platform and i am running my script on Unix machine; What are the possibilities by which i can map network drive in perl Please reply thanks in Advance, aNa

Member Avatar for rana03
0
764
Member Avatar for sid78669

I am trying to create the meta tag: [CODE=HTML]<META HTTP-EQUIV="Pragma" CONTENT="no cache">[/CODE] I tried the following line: [CODE=PERL]print $cgi->start_html(-title => 'Meta Test', -meta=> { 'HTTP-EQUIV'=>'Pragma', 'CONTENT'=>'no cache'}), "\n"; [/CODE]But I get this: [CODE=HTML]<meta name="HTTP-EQUIV" content="Pragma" /> <meta name="CONTENT" content="no cache" /> [/CODE] Can someone tell me how to create the …

Member Avatar for sid78669
0
159
Member Avatar for kishore5001

Hi, i want to run a c code , with perl as script.. i want to compile and run the c code , in a.pl file How to do it ... Any links

Member Avatar for ithelp
0
74
Member Avatar for punitdam

I am trying to connect Mysql5.1 from Perl 5.8.8 on RHEL5 as follows: [code] $dsn="DBI:mysql:database=mysql"; $dbh=DBI->connect($dsn, 'root', 'root', 'mysql',{RaiseError => 1}); [/code] When I try to run perl containing above connection, it gets connected to Mysql and fetches data but displays following warning. [QUOTE]DBI->connect using 'old-style' syntax is deprecated and …

Member Avatar for punitdam
0
517

The End.