|
Posted by Paul Richardson on May 18, 2008, 5:56 pm
Please log in for more thread options
> Paul Richardson wrote:
>
>> I am trying have following perl code:
>>
>> #!/usr/bin/perl
>> #
>> # Options for this script
>> # -c : compile only don't simulate
>> # -gui: invoke simulator with the gui
>> #
>> use lib '/usr/lib/perl5/5.8.5/Getopt';
>
> What's this good for?
For some reason my path for searching was set up correctly
>
>> use Getopt::Long;
>> #
>> my $alternate_dot_vf_file = '';
>> #
>> GetOptions('f=s' => $alternate_dot_vf_file);
>> print "Printing vf file \n";
>> print $alternate_dot_vf_file;
>
> Looks good, except for missing '. "\n"' at the end of last line.
ok
>
>> die;
>
> Why "die" when there is no error? Better "exit (0)".
ok
>
>> My expectation would have been that if I invoked this code "lets call
>> it hack" as follows:
>>
>> hack --f someRandomFileName
>>
>> I would have got print out that said:
>> Printing vf file
>> someRandonFileName
>
> And what do you get?
I got n nothing as in , nothing was printed out , I expected to see
"someRandomFileName" printed out
>
>> I am using the is my spefication to GetOptions incorrect ?
>
> Yes.
>
> Bye...
>
> Dirk
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
http://www.usenet.com
|