in reply to Running Entire Bash Script Inside Perl

Hi There, :)

Why not do it this way?

#!/usr/bin/perl

my $script =<<EOT;
#!/bin/sh
echo "hello"
echo \$1
echo "hi"
EOT

system("echo \"$script\" > script.sh");
system("./script.sh", "world?");

Maybe that's too bashy to be considered perl? :D

Respectfully,

Brother Hippsta
  • Comment on Re: Running Entire Bash Script Inside Perl