PERL error message - Useless use of a variable in void context

2005-03-03 Thread Danny Fang
Hi, I've a script below which reads the contents of a text file which contains the output of the `ls -lR` in UNIX. This script reads the list of html files contained in the text file, and for every file it checks to see it contains some specified HTML tags or not. If it does not, this script

Re: PERL error message - Useless use of a variable in void context

2005-03-03 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Danny Fang) writes: >--0-972884666-1109846115=:30240 >Content-Type: text/plain; charset=us-ascii > >Hi, > >I've a script below which reads the contents of a text file which contains the >output of the `ls -lR` in UNIX. This script reads the lis

Re: scp in perl

2005-03-03 Thread Wiggins d'Anconia
susan lam wrote: Hi, I have a script that copies files from one server to another via the scp system call. On unix, I usually do a "sum" manually on files to make sure that the files got transferred properly. I would like to automate this process in perl - transferring files over to another serve

How to PERL-ify sort -nrk1,1 -nk2,2

2005-03-03 Thread S.A. Birl
I know little about sorting in PERL: sub SortByIPoccurance { $IPaddr{$a} <=> $IPaddr{$b}; } @top_hosts = reverse sort SortByIPoccurance (keys %IPaddr); print "Frequently connecting hosts (# of http/s hits):\n"; print "--- \n"; foreach $hosts

Any ideas on 'uninitialized value in lenth'?

2005-03-03 Thread Bret Goodfellow
Here's a simple perl script where I am listing out the contents of a directory. When it completes, the following error occurs. How do I eliminate this? Use of uninitialized value in length at C:\BegPerl\deldir.pl line 23. Below is the script: #!/usr/bin/perl # Dsrch1.plx # use strict ; use

Re: Any ideas on 'uninitialized value in lenth'?

2005-03-03 Thread Wiggins d'Anconia
Bret Goodfellow wrote: Here's a simple perl script where I am listing out the contents of a directory. When it completes, the following error occurs. How do I eliminate this? Use of uninitialized value in length at C:\BegPerl\deldir.pl line 23. Below is the script: #!/usr/bin/perl # Dsrch1.

SFTP

2005-03-03 Thread Tim Wolak
Hello all, This is my first attempt at writting a script for automating a sftp session and could use a little help. Can someone have a look at my script and give a me few pointers? I know I may be missing a few things but I have not worked a lot with modules yet so forgive the mistakes. Thank

Re: SFTP

2005-03-03 Thread Ing. Branislav Gerzo
Tim Wolak [TW], on Thursday, March 03, 2005 at 10:19 (-0600) contributed this to our collective wisdom: TW> script and give a me few pointers? I know I may be missing a few things TW> but I have not worked a lot with modules yet so forgive the mistakes. for me looks OK, just: TW> Thanks for you

Re: Test.

2005-03-03 Thread JupiterHost.Net
Zeus Odin wrote: Do not read. To late :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

setting program priority by PID

2005-03-03 Thread Ing. Branislav Gerzo
Hello, I'm on windows and I'd like to set program priority, if I know program PID. It is possible ? Thanks -- --. ,-- ,- ICQ: 7552083 \|||/`//EB: www.2ge.us ,--' | - |--IRC: [2ge](. .),\\SN: 2ge!2ge_us `+==+=+===~ ~=-o00-(_)-00o-~

SFTP cont.

2005-03-03 Thread Tim Wolak
Ok, thanks for your help so far, this is what I have now: use strict; use Net::SFTP; my $user = 'user1'; my $password = 'password'; my $host = "0.0.0.0"; my $sftp = Net::SFTP->new($host); $sftp->login($user,$password) or die "Can't connect... $!"; $sftp->put("test.txt"); However when I run it I get

RE: setting program priority by PID

2005-03-03 Thread Bakken, Luke
> Hello, > > I'm on windows and I'd like to set program priority, if I know program > PID. It is possible ? Use Win32::Process: http://search.cpan.org/~jdb/libwin32-0.24/Process/Process.pm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: SFTP

2005-03-03 Thread Jenda Krynicky
From: "Ing. Branislav Gerzo" <[EMAIL PROTECTED]> > Tim Wolak [TW], on Thursday, March 03, 2005 at 10:19 (-0600) > contributed this to our collective wisdom: > TW> my $host = "0.0.0.0"; > TW> my $sftp = Net::SFTP::->new($host); > $sftp->login("$user","$pass"); > $sftp->put("test.txt"); > > you dont

RE: z/OS unicode problem.

2005-03-03 Thread Graeme St. Clair
Well, not exactly. The extra \x00 is only present in characters whose value <= 127, which actually does not include either A-grave; the lc one is \xe0, the uc \xc0. Otherwise, there is an increasingly elaborate encoding scheme, which may occupy 2, 3 or 4 bytes. I'll paraphrase part of it:- A 2-

RE: z/OS unicode problem.

2005-03-03 Thread Graeme St. Clair
This looks like a bug (hfff!) in your version of Perl. On my Windows XP (Bcombo Perl/Apache (ActivePerl 5.6.1 Build 635), it barfs on both (Bexpressions, thus:- (B (B#!/usr/local/bin/perl (B (Buse strict; (Buse warnings; (Buse Data::Dumper; (Buse charnames ':full'; (B (B$a = "\N{LATIN S

RE: z/OS unicode problem.

2005-03-03 Thread Rajarshi Das
Hi, Thanks for the help. I printed the chars, $a, and $b before and after removing the 0x00 chars but they seem to be the same. And the test fails. What is strange is that the reverse of the test passes ($b =~ m/[$a]/i;) Any other thoughts/ ideas on why this might be happening ? Thanks, Rajarshi.

Re: How to PERL-ify sort -nrk1,1 -nk2,2

2005-03-03 Thread John W. Krahn
S.A. Birl wrote: I know little about sorting in PERL: sub SortByIPoccurance { $IPaddr{$a} <=> $IPaddr{$b}; } @top_hosts = reverse sort SortByIPoccurance (keys %IPaddr); If you want the reverse order then do it in the sub used by sort: sub SortByIPoccurance { $IPaddr{$b} <=> $IPaddr{$a} } @top_hosts

installing DBD::mysql

2005-03-03 Thread Adamiec, Larry
I am trying to install the mysql drivers using CPAN. I am runnig Solaris 9 on a Sparc server. I entered: perl -MCPAN -e shell then install Bundle::DBD::mysql The final screen and a half of output is here: Checking if your kit is complete... Looks good Using DBI 1.47 (for perl 5.008 on sun4-s

Re: Any ideas on 'uninitialized value in lenth'?

2005-03-03 Thread John W. Krahn
Wiggins d'Anconia wrote: Bret Goodfellow wrote: Here's a simple perl script where I am listing out the contents of a directory. When it completes, the following error occurs. How do I eliminate this? Use of uninitialized value in length at C:\BegPerl\deldir.pl line 23. Below is the script:

Re: Any ideas on 'uninitialized value in lenth'?

2005-03-03 Thread Wiggins d'Anconia
John W. Krahn wrote: Wiggins d'Anconia wrote: [snip] Very good Wiggins, but you missed one very important point! Yep, good catch... I think this gets back to your earlier posting, "Test everything." ;-) [snip doc] John http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Re: PERL error message - Useless use of a variable in void context

2005-03-03 Thread John W. Krahn
Danny Fang wrote: Hi, Hello, I've a script below which reads the contents of a text file which contains the output of the `ls -lR` in UNIX. Why?? Why not just use File::Find? This script reads the list of html files contained in the text file, and for every file it checks to see it contains some

perl program to convert system date to yymmdd

2005-03-03 Thread Nishi Prafull
HI: I want to write a perl script that would compute the date in the format yymmdd(050303) and subsitute it for a variable in the perl script. This variable is thereafter subsituted in a command that will be run inside the script. myTest.pl var aDate; get todays date and convert it to yymmdd and

RE: Perl program to convert system date to yymmdd

2005-03-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Nishi Prafull wrote: > HI: > > I want to write a perl script that would compute the date in the > format yymmdd(050303) and subsitute it for a variable in the perl > script. This variable is thereafter subsituted in a command that will > be run inside the script. > > myTest.pl > > var aDate;

Re: Perl program to convert system date to yymmdd

2005-03-03 Thread Nishi Prafull
On Thu, 3 Mar 2005 12:12:35 -0800, Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: > Nishi Prafull wrote: > > HI: > > > > I want to write a perl script that would compute the date in the > > format yymmdd(050303) and subsitute it for a variable in the perl > > script.

RE: Perl program to convert system date to yymmdd

2005-03-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Nishi Prafull wrote: > On Thu, 3 Mar 2005 12:12:35 -0800, Wagner, David --- Senior Programmer > Analyst --- WGO <[EMAIL PROTECTED]> wrote: >> Nishi Prafull wrote: >>> HI: >>> >>> I want to write a perl script that would compute the date in the >>> format yymmdd(050303) and subsitute it for a varia

RE : Perl program to convert system date to yymmdd

2005-03-03 Thread Jose Nyimi
> -Message d'origine- > De : Wagner, David --- Senior Programmer Analyst --- WGO > [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 3 mars 2005 21:40 > À : Nishi Prafull > Cc : beginners@perl.org > Objet : RE: Perl program to convert system date to yymmdd > > Nishi Prafull wrote: > > On Thu, 3

RE: RE : Perl program to convert system date to yymmdd

2005-03-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Jose Nyimi wrote: >> -Message d'origine- >> De : Wagner, David --- Senior Programmer Analyst --- WGO >> [mailto:[EMAIL PROTECTED] >> Envoyé : jeudi 3 mars 2005 21:40 >> À : Nishi Prafull >> Cc : beginners@perl.org >> Objet : RE: Perl program to convert system date to yymmdd >> >> Nishi Pra

Running exe files in Perl

2005-03-03 Thread Julius Eric Abe
Hi, Is there a way in Perl or a function that has the capabilities of calling or running executable files, let say i want the calculator in windows run and I would call it through perl, is this possible. Thanks, Julius - Celebrate Yahoo!'s

RE: Running exe files in Perl

2005-03-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Julius Eric Abe wrote: > Hi, > > Is there a way in Perl or a function that has the capabilities of > calling or running executable files, let say i want the calculator in > windows run and I would call it through perl, is this possible. > Here is a simple shot. I use the editor scite an

Re: RE : Perl program to convert system date to yymmdd

2005-03-03 Thread Nishi Prafull
Hi All: Thanks for the replies.It works correctly. I need to do similar thing for extracting the time in the format hhmm ie if it 2:05 pm then i need to display 1405 If the date command returns Thu Mar 3 13:56:24 PST 2005 then i need to convert the time format to 1356 Please let me know how I

RE: RE : Perl program to convert system date to yymmdd

2005-03-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Nishi Prafull wrote: > Hi All: > > Thanks for the replies.It works correctly. > I need to do similar thing for extracting the time in the format hhmm > ie if it 2:05 pm then i need to display 1405 > > If the date command returns > Thu Mar 3 13:56:24 PST 2005 > then > i need to convert the time f

Re: RE : Perl program to convert system date to yymmdd

2005-03-03 Thread Nishi Prafull
yes :-) I realised that after sending you the email. Sorry! Thanks for the reply. On Thu, 3 Mar 2005 14:18:04 -0800, Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: > Nishi Prafull wrote: > > Hi All: > > > > Thanks for the replies.It works correctly. > > I need to

RE : RE : Perl program to convert system date to yymmdd

2005-03-03 Thread Jose Nyimi
> -Message d'origine- > De : Nishi Prafull [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 3 mars 2005 23:12 > À : Wagner, David --- Senior Programmer Analyst --- WGO > Cc : Jose Nyimi; beginners@perl.org > Objet : Re: RE : Perl program to convert system date to yymmdd > > Hi All: > > Thanks

call a perl script within another perl script

2005-03-03 Thread Nishi Prafull
Hi: I would like to call a perl script(B.pl) within another perl script(A.pl). Should I use the following approach or something else? A.pl - my $cmd = "perl B.pl" system($cmd); Please let me know. Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

RE: call a perl script within another perl script

2005-03-03 Thread Tim Johnson
I guess it partly depends on what you are trying to accomplish. Why are you calling a second script? -Original Message- From: Nishi Prafull [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 3:47 PM To: beginners@perl.org Subject: call a perl script within another perl script

Re: call a perl script within another perl script

2005-03-03 Thread Nishi Prafull
Hi: Apparently I noticed that when I put both the commands I need to run in one script using the system call, the second command does not get executed ( I cannot figure out the cause). Each of the commands are making out calls to software installed on the machine to perform specific tasks. Do I ha

RE: call a Perl script within another Perl script

2005-03-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Nishi Prafull wrote: > Hi: > Apparently I noticed that when I put both the commands I need to run > in one script using the system call, the second command does not get > executed ( I cannot figure out the cause). They would have to be two separate calls. I used to start 10 to 15 processe

Re: call a Perl script within another Perl script

2005-03-03 Thread Nishi Prafull
Apparently, the first command spawns a new shell when it is executed and the control is never returned back and hence i cannot get the second command to get executed. So I am trying to evaluate the -exec option. Thanks. On Thu, 3 Mar 2005 16:14:30 -0800, Wagner, David --- Senior Programmer Analy

javascript in Perl?

2005-03-03 Thread DBSMITH
People of the Perl, There is this website on our internal LAN that serves as a DNS mgmt tool and it is called qip developed by Lucent. I know it is written in Perl but I believe it also uses java script. Below is the main page and is show IE's status bar referencing a perl script within the seco

Defined revisited

2005-03-03 Thread Walter A Poor Jr
Sorry to bother you, since I notice other people have also been asking about defined. But the answers to their questions have not helped me to this point. This morning I started seeing a vague, unhelpful warning message about an undefined variable from a program after months of successful use.

Re: javascript in Perl?

2005-03-03 Thread DBSMITH
Below is the gui query |--+--| | | | |Object List by Administrator | | |--+--| | |

Re: call a Perl script within another Perl script

2005-03-03 Thread Rathna N
then what about thru (``) Backtic or open call ? Syntax: 1. $x=`ps -ef`; 2. open(fh,"$cmd |"); Regards, Rathna On Thu, 3 Mar 2005 16:25:45 -0800, Nishi Prafull <[EMAIL PROTECTED]> wrote: > Apparently, the first command spawns a new shell when it is executed > and the control is never returned