Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Space in getopt option value

by toolic (Bishop)
on Aug 01, 2012 at 18:32 UTC ( [id://984871]=note: print w/replies, xml ) Need Help??


in reply to Space in getopt option value

Here is one way:
use warnings; use strict; use Getopt::Long; use Data::Dumper; $Data::Dumper::Sortkeys=1; my %opt; GetOptions(\%opt, 'foo=s') or die; print Dumper(\%opt); __END__ myhack.pl --foo 'bar1 bar2 bar3' $VAR1 = { 'foo' => 'bar1 bar2 bar3' };
The you can process $opt{foo} if you wish.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://984871]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-24 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found