On Fri, 9 Nov 2012 09:33:23 -0500 (EST) Matt Sheppard <mshepp...@dyn.com> wrote:
> Looking for advice on how to be more "perlish" in this bit of code. > The idea is to allow execution of a script without pathing in the $0 > parameter: > > if ($0 =~ m/^\//) { > exec("$0 @ARGV"); > } else { > exec("./$0 @ARGV"); > } exec( $0, @ARGV ); die "could not create infinite loop\n"; -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. Why fit in when you can stand out? Dr. Seuss The only way that problems get solved in real life is with a lot of hard work on getting the details right. Linus Torvalds -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/