Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: PERL REST API Post script

by tangent (Parson)
on Feb 10, 2020 at 21:51 UTC ( [id://11112745]=note: print w/replies, xml ) Need Help??


in reply to PERL REST API Post script

Not an answer, but, when writing command line scripts I find using the core module Getopt::Long to parse options much more flexible (and easier to debug). For your script:
use Getopt::Long; my ( $phoneip, $user, $Address, $passcode, ); GetOptions( 'phoneip=s' => \$phoneip, 'user=s' => \$user, 'Address=s' => \$Address, 'passcode=s' => \$passcode, );
You would then call it with the arguments in any order, and you can easily add options:
perl script.pl --user username --phoneip 201.34.56.78

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-28 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found