in reply to execute perl script frm shell script
That assumes that you've done "chmod +x" on Script1.pl and Script2.pl, and they are in your shell's PATH (e.g., if they are in your current working directory, then your PATH should include ".").#!/usr/bin/perl my $script = ( $^O =~ /linux|solaris/ ) ? "Script1.pl" : "Script2.pl"; exec $script, @ARGV;
It might be even better if the differences between Script1 and Script2 could be merged into a single perl script, with appropriate logic to do things differently depending on the value of $^O. Then you don't need a separate "wrapper" script at all.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: execute perl script frm shell script
by Anonymous Monk on Mar 28, 2006 at 09:25 UTC | |
by jonadab (Parson) on Mar 28, 2006 at 12:33 UTC | |
by graff (Chancellor) on Mar 28, 2006 at 10:40 UTC |