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
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
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
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.
__
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
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
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("
[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
$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
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" .
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
;
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
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..."
$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
14 matches
Mail list logo