What is this doing: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0;

2004-08-07 Thread JupiterHost.Net
I found this code in a script right after the she-bang line: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0; # not running under some shell What is it doing? Its like its executing itself again, but why? What the heck is: ${1+"$@"} ?? Wouldn't the eval never get done because of the if 0;

Re: What is this doing: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0;

2004-08-09 Thread Jose Alves de Castro
On Sun, 2004-08-08 at 04:06, JupiterHost.Net wrote: > I found this code in a script right after the she-bang line: > > eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' > if 0; # not running under some shell > > What is it doing? Hi. From `perldoc perlrun`, under -S : Typically this is used

Re: What is this doing: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0;

2004-08-09 Thread JupiterHost.Net
Jose Alves de Castro wrote: On Sun, 2004-08-08 at 04:06, JupiterHost.Net wrote: I found this code in a script right after the she-bang line: eval 'exec /usr/bin/perl -T -w -S $0 ${1+"$@"}' if 0; # not running under some shell What is it doing? Hi. From `perldoc perlrun`, under -S : Hello Jose,