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

Re: PERL REST API Post script

by tangent (Vicar)
on Feb 10, 2020 at 21:51 UTC ( #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? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2022-01-27 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?