Re: Problem with Variable

2010-01-21 Thread Shlomi Fish
Hi Rajpreet! Here are a few general comments about your code. On Thursday 21 Jan 2010 13:56:42 Rajpreet wrote: > Greetings, > > I am trying to read a message from MQ series in perl and want to > update SYbase with this message. Even though ,the update when directly > run from command line, works

Re: problem with variable scope

2007-10-22 Thread Jenda Krynicky
From: "Siva Prasad" <[EMAIL PROTECTED]> > while(<$FILE_H>) > > { > > next unless /()/; > > my @Rows=grep(/()/,<$FILE_H>); > > return(@Rows); use HTML::TableExtract; Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed t

Re: problem with variable scope

2007-10-22 Thread Tom Phoenix
On 10/22/07, Siva Prasad <[EMAIL PROTECTED]> wrote something resembling: > sub GET_Values > { > my $Rows; > my $cate; What are those variables used for? > my $self=shift; > print "$self->{InputFile}\n"; > (open my $FILE_H '<', $self->{InputFile}) || die"cannot open the input > file"; > while(<$F

RE: problem with variable scope

2007-10-22 Thread Siva Prasad
Hi Gurus, I got the mistake which I was doing. Thanks a lot PP. _ From: Siva Prasad [mailto:[EMAIL PROTECTED] Sent: Monday, October 22, 2007 8:01 PM To: 'beginners@perl.org' Subject: problem with variable scope Hi Gurus, I have written a package as below. __

Re: problem with variable scope

2007-10-22 Thread Jeff Pang
On 10/22/07, Siva Prasad <[EMAIL PROTECTED]> wrote: > > while(<$FILE_H>) > > { > > next unless /()/; > > my @Rows=grep(/()/,<$FILE_H>); > > return(@Rows); > > close $FILE_H; > > } > Well,the first error I have noticed,you have lost a "}" in the code above. Have you run `perl -c parseSite.pm` befor

Re: Problem with variable in system command

2002-10-10 Thread John W. Krahn
Anthony Kernan wrote: > > Here is the complete script... > > #!/usr/bin/perl -w > use strict; > use File::Find; > my $dir = '/usr/local/etc/mrtg'; > my $ext = '.pid'; > my (@dirstruct); > my $mypid; > > find(\&wanted,$dir); > > foreach my $afile (@dirstruct) { > $mypid = system("cat $afile

RE: Problem with variable in system command

2002-10-10 Thread Nikola Janceski
D] > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: Problem with variable in system command > > > Thanks, it's working now. I couldn't get the perl kill to > work, it kept > dieing. I used system("

RE: Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
[EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Problem with variable in system command > Thanks for your replies. I understand that system() returns an exit > code when it is done. My problem is that the command to be run by > system() is not getting the variable

RE: Problem with variable in system command

2002-10-10 Thread Paul Johnson
$mypid or die "Can't signal $mypid"; where $sig is whatever signal you want to send. perldoc -f kill > > -Original Message- > From: Dharmender Rai [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 10, 2002 8:40 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED

RE: Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
al Message- From: Dharmender Rai [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 8:40 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Problem with variable in system command Anthony, system() return the exit status. Type "perldoc -f system" .

RE: Problem with variable in system command

2002-10-10 Thread Dharmender Rai
gt; push @dirstruct, $entry if (($entry ne '') && (( > m/$ext$/) and (substr > $entry, 0, -4))); #This will only work with *.pid > } > > > > -Original Message- > From: Dharmender Rai > [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October

RE: Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
; push @dirstruct, $entry if (($entry ne '') && (( m/$ext$/) and (substr $entry, 0, -4))); #This will only work with *.pid } -Original Message- From: Dharmender Rai [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 8:06 AM To: [EMAIL PROTECTED]; [EMAIL PROT

RE: Problem with variable in system command

2002-10-10 Thread Anthony . Kernan
Here is the complete script... #!/usr/bin/perl -w use strict; use File::Find; my $dir = '/usr/local/etc/mrtg'; my $ext = '.pid'; my (@dirstruct); my $mypid; find(\&wanted,$dir); foreach my $afile (@dirstruct) { $mypid = system("cat $afile"); chop($mypid); print "Killing instance..."

Re: Problem with variable in system command

2002-10-10 Thread Dharmender Rai
$mypid contains the status of the process not its pid. --- [EMAIL PROTECTED] wrote: > I've written a script to search for all *.pid files > in a dir, then do > a cat on the file. The script will then use this > variable to kill the > process. The problem I'm having is that the > varibale is no