473,538 Members | 16,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Perl Forum

Perl programming language - ask questions about perl programming, syntax, variables, scoping, constructs, operators and functions, files, I/O, regular expressions, regex, subroutines, OO (object oriented), perl modules, CGI and more.
2
6,770
thread by: Andrew Rich | last post Jul 19 '05 by: nobull
Howdy, I have a need to do this :- 1. find a match 2. go back three lines 3. read out lines 1 2 3 eg
8
6,769
thread by: vasu1308 | last post Mar 14 '07 by: miller
Hi I want to monitor disk space and send a email if it exceeds the limit. I m using "use Filesys:: Diskspace" but there is an error in compling. "Can't locate Filesys/Diskspace.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8...
2
6,766
thread by: Paolo | last post Oct 5 '05 by: octoberdan
There is something I can't understand which is the following. I have a system command which runs a commandline to unzip a file: my $Out = system ( $rootPath."bin/bin/gunzip -dfc ". $SourceFilePath." > ".$rootPath.$DestinationPath.".txt"); This works fine. since I would like to make it parallel and run 4 processes at a time I wrote this...
3
6,759
thread by: James B. | last post Jul 19 '05 by: James B.
I have written a perl script to parse some large flat-text logs. The logs are bzipped and come in through a pipe to STDIN. The script then performs some regular expressions to the incoming data then prints to STDOUT. The script works great, but the issue I have is that the script uses as much memory as the data coming into it. Therefore if...
1
6,759
thread by: tpawona | last post Nov 16 '06 by: GunnarH
I'm writing a script that would be run by user oracle, that would logon to all the databases on the server. Thus I'll need to logon as sysdba. In Sqlplus, this would be sqlplus / as sysdba. How do I do this in Perl. I've tried $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid","/","",{ ora_session_mode => SYSDBA }); I keep getting...
1
6,752
thread by: starlight849 | last post Sep 11 '12 by: RonB
I have a simple script that opens a directory, reads through all the file names and then prints the output to a text file in a different directory. It looks something like this. My Question is how to write to the file using $OutputDir for my path instead of including the entire path in the manner that I'm using now. Any suggestions on how to...
2
6,743
thread by: furrypop | last post Sep 3 '07 by: miller
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also definitely getting a hit when I use a browser to get to my hibye.cgi server (well, a blank page rather than a 404). However, when I run my hibye.pl...
3
6,739
thread by: diptiperlforum | last post Dec 3 '14 by: prashantsaraogi
Is there any way I can retrieve Last modified Date of a ftp directory. i tried $date_string = ftp->mdtm($directoryname) But i get the error "File not found"
2
6,732
thread by: jenny04 | last post Mar 18 '07 by: jenny04
I have a program which uses www::mechanize. But im having trouble installing it. Can anyone explain it to me or send me a website that has it on it. Any help will be appricated.
9
6,728
hsn
thread by: hsn | last post Aug 29 '08 by: numberwhun
hello everyone. i am trying to read a .cgi fiile. but, it is not working with me. let me explain. i have a belkin router, and i am studying it, when i enter the password in runs a passwordproccess.cgi i am trying to read that file so i can understand the system and write a program which will help the user to be able to configure the system much...
2
6,721
thread by: Studentmadhura05 | last post Nov 28 '06 by: Studentmadhura05
Is there any way one can get the current date from the system in Perl? Please help!
2
6,701
thread by: lilly07 | last post Feb 24 '11 by: lilly07
Hi, I have to call ' java -jar name.jar arg1 arg2' in my perl script. The java prints a string if we invoke the above command How to capture this information. Thanks and regards.
2
6,699
thread by: Daniel Bergquist | last post Jul 19 '05 by: Joe Smith
Consider the following chunk of code: -------------------------------------------------- open (IN, "<:raw", "test2.txt") or die "Can't open test.txt"; chomp($line = <IN>); # Capture excerpt $line =~ m/>(+)/; # Copy first line of excerpt
11
6,699
thread by: jcor | last post Sep 25 '07 by: numberwhun
Can anyone give me some help, plz I want to create a perl script to be watching a folder. Everytime a new file gets there it triggers some code; How can I do this? TIA, Joćo Correia
4
6,696
thread by: santhanalakshmi | last post Feb 10 '11 by: numberwhun
Hi, In ODBC, i given data source name and the test connection is also successful. But i don't know, why i am facing this error DBI connect('wwwdsn','webid',...) failed: Data source name not found and no default driver specified (SQL-IM002) at C:/Program Files/Apache Group/Apache2/cgi-bin/auth/studpass.cgi line 20, referer:...
15
6,691
thread by: Ruchi choudhary | last post Mar 4 '13 by: RonB
Hello, I want to insert data through html page. So for that I created two file one is for html page(insertdis.html) and second one is for perl script(insert1.pl).But it could not work. Is it correct way for inserting data in database? Another option of using PERL-CGI but I do not know about this language so please kindly help me. ...
2
6,671
thread by: Stan Horwitz | last post Feb 15 '06 by: Stan Horwitz
I am working on a perl program where I extract a variable from a line of input and I want to keep a running count of that variable. I am using the substr function to extract the variable. For purposes of example, let's say the extracted variable is called $extracted_variable and my total variable is called $total. The $extracted_variable comes...
5
6,668
KevinADC
thread by: KevinADC | last post Feb 27 '08 by: KevinADC
Introduction This discussion of the sort function is targeted at beginners to perl coding. More experienced perl coders will find nothing new or useful. Sorting lists or arrays is a very common requirement of programs. If you don't know the difference between a list and array don't worry about it. A list is just an array without a name. They...
1
6,668
thread by: jovalBag | last post Jun 9 '10 by: RonB
hi I'm trying to use the example here: http://search.cpan.org/~gaas/libwww-perl-5.836/lib/LWP.pm#An_Example here is the code: use LWP::UserAgent; use LWP::Debug qw(+);
1
6,661
thread by: R D | last post Jul 19 '05 by: Roel van der Steen
Thanks for quick reply. Cwd didn't work because it gives what directory you are currently in not the directory the script is in! Can't get FindBin to work..any idea what's wrong with the following? my $Bin; use FindBin qw($Bin); use lib "$Bin/../lib";
2
6,655
thread by: Liachta | last post Jan 22 '08 by: mdshafi01
Hi I have a script called test.pl which calls another script using system The problem is in test.pl I want to call system("stockroom.pl?stkid=23&pn=17Z78&sn=1234567890") But this does not work?
8
6,653
thread by: Shabam | last post Sep 25 '05 by: Tim X
I have a command script that backs up a user account. This involves moving files from different directories into an archive. Now, I need that script to back up all user accounts on the system, by going through the directory structure and running the backup script on each one. Can someone show me how this can be done? I'm not a perl...
11
6,644
thread by: Natti | last post May 1 '07 by: crazychickenhead
Hello, I start fileevents as soon as my tk code is invoked. My widget gets updated based on the fileevents. Most of the files do not exist in the beginning and so I get the following messages on the prompt where I invoked the perl/tk program. tail 'filename' for reading:no such file or directory. The widget update works fine. But is...
6
6,639
thread by: powerfulperl | last post Mar 17 '10 by: RonB
I want to write a perl script for the below condition Files not contained in the user's home directory and files contained in the user's home directory, and owned by that user(user's account deleted), will remain on the system. The file will still be owned by the deleted account's user ID (UID). I want to throw a warning message whenever...
13
6,633
thread by: helpmesos | last post Sep 28 '08 by: Icecrack
hihi Firstl i got most of this code from another person on another forum but I have been trying like crazy to modify it so that it reads a list of scrambled words from a file and outputs the unscrambled words to another file. scrambled.txt = input file unscrambled.txt = output file here is the code:

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.