EchoAngel has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I have this idea where I run my perl script with certain arguments. If it does die within my script , I want to recreate the extra unix command line that was used.
ie abc.pl -file1 testing.txt atitech -extract_lines
is there anyway to find out what was my command within my perl script? note I am using Getopt::Long; any examples would be nice

Replies are listed 'Best First'.
Re: Extract Last Command Line Within script
by Joost (Canon) on Mar 02, 2005 at 17:20 UTC
Re: Extract Last Command Line Within script
by RazorbladeBidet (Friar) on Mar 02, 2005 at 17:22 UTC
    I'm not entirely sure I understand the question. The thing that's throwing me off is extra unix command line.

    If you just want the command and args as they were typed in

    print "$0 ".join( " ", @ARGV )."\n"

    or something similar should suffice.
    --------------
    It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs