in reply to perl command line option - ( -x )
If I run the above program as #perl test.pl I will be getting syntax error.Unwanted Lines Here ............... ---------------- etc., #!/usr/bin/perl -w use strict; print "Hai Ashok ...\n"; system('ls'); __END__
If I run the program as #perl -x test.plsyntax error at test.pl line 3, near "......" "use" not allowed in expression at test.pl line 9, at end of line Execution of test.pl aborted due to compilation errors.
Here dirName1 and dirName2 are directories. If I run the same progrma by #perl -xdirName1 test.plOutput is Hai Ashok .. x.pl y.pl z.pl dirName1 dirName2
abc.pl and xyz.pl are the files under dirName1.Output is Hai Ashok .. abc.pl xyz.pl
|
|---|