in reply to Processing command line based on user input

Search for Getopt and Getoptions::Long

A quick sample:

use Getopt::Std; use Data::Dumper; $options={}; getopt("df",$options); print Dumper($options);

Peter (Guo) Pei

Replies are listed 'Best First'.
Re^2: Processing command line based on user input
by iphone (Beadle) on Nov 20, 2010 at 05:01 UTC

    Running the above is giving the following output.Now how do I access these options and run my exe findfile? $VAR1 = { 'd' => 'C:\', 'f' => 'file.c' };

    #!/usr/bin/perl -w use strict; use warnings; `findfile.exe <opt_f> <opt_d>`