Re: -e with single quotes

2003-12-10 Thread perl-beginners
On Wed, Dec 10, 2003 at 05:05:26PM -0600, Dan Muey wrote: > perl -e 'print "joe's mama";' > Obvo=iously won't work > perl -e 'print "joe\'s mama";' > And any other versions of \\' all fail. As you were told, this is a question of your shell. If you are using a bourne shell (zsh, bash, ksh, etc...)

Re: 1 doubt.

2003-12-10 Thread perl-beginners
On Thu, Dec 11, 2003 at 09:27:48AM +, Ajey Kulkarni wrote: > perl t.pl > Name "main::FH" used only once: possible typo at t.pl line 6. You opened a file, but you do not read from the file. Just opened it. This doesn't make much sense. So you get a warning. > cat t.pl > > #!/usr/bin/perl > >

Re: pid of process opened by system

2003-12-09 Thread perl-beginners
On Mon, Dec 08, 2003 at 06:48:17PM -0800, david wrote: > eval{ > > local $SIG{ALRM} = sub { die 'alarm' }; > > $child = fork; > > die 'fork' unless(defined $child); > > if($child){ > #-- > #-- give child 5 seconds to complete >

Re: pid of process opened by system

2003-12-08 Thread perl-beginners
On Tue, Dec 09, 2003 at 01:04:01AM +0100, [EMAIL PROTECTED] wrote: > eval { > local $SIG{ALRM} = sub { die "alarm\n" }; > alarm 10; > system($prog, @args); > alarm 0; > }; > if($@ =~ /alarm/) { > # have to kill $prog; # I tried with 'use POSIX qw/sys_wait_h/;' my $kid = waitpid -1

pid of process opened by system

2003-12-08 Thread perl-beginners
Hello, I'm doing this: eval { local $SIG{ALRM} = sub { die "alarm\n" }; alarm 10; system($prog, @args); alarm 0; } if($@ =~ /alarm/) { # have to kill $prog; } The problem is, that the process is still running after the perl script has exited. And I have to kill it by hand. But I want p