I want to call my perl script as a command from command line. Example lets say I have a perl file like following
#!/usr/local/bin/perl -w
@args =("mvn","package");
system(@args) == 0
or die "system @args failed"
I right not call this using package.pl
I tried doing the following
#!/bin/sh
eval 'exec /bin/perl –x -S $0 ${1+"$@"}'
if 0;
#!/usr/local/bin/perl -w
@args =("mvn","package");
system(@args) == 0
or die "system @args failed"
and then name the file 'package' .Do chmod on package
When I try to run package, then I get the error "Can't open perl script []x:No such file or directory
Can someone please point me out , as to how to do this properly??
Thanks
Neeraj
.pl: Perl doesn't care. Just use#!/usr/local/bin/perl -wat the top of a file calledpackage. File name suffixes are really just a Dos/Windows thing/bin/shis reallyshor compatible withsh(likebash).