in reply to Re: perl and shell
in thread perl and shell

Monks, My code is
#!/usr/bin/perl system('./hello.sh FileOpen.pl') == 0 or die "Couldn't launch './hell +o.sh': $! / $?";
and output is
perl Sample.pl Hello Madam It is Working ./hello.sh: line 3: #!/usr/bin/perl: No such file or directory Couldn't launch './hello.sh': / 32512 at Sample.pl line 2.
The script is
#!/bin/bash echo 'Hello Madam It is Working'; `cat $1`;
I am new to perl with shell thats why i added in this portion
and i have a doubt is there any module "shell" . please help me from where i have to download.
Thanks in advance

Replies are listed 'Best First'.
Re^3: perl and shell
by almut (Canon) on Jun 30, 2007 at 18:31 UTC
    `cat $1`

    That doesn't make much sense. You're trying to run the contents of FileOpen.pl as a shell command...

    Just write ./$1 instead and everything will be fine. The "./" part might be required, as on Unix, "." (the current directory) is typically not in the searchpath for executables (for security reasons).