in reply to How do i use the wget command in perl
Well, you could just use qx(): qx(wget -q -nv -U "sonicbox/imtuner_build81 ($2)" 'http://mail.sonicbox.com:'$1'/tuner/SetZBand?UserID=testuser;StationNumber='$3')
Or back-quotes (``): `wget -q -nv -U "sonicbox/imtuner_build81 ($2)" 'http://mail.sonicbox.com:'$1'/tuner/SetZBand?UserID=testuser;StationNumber='$3'`
Both of those will execute the external command and return the output as an array (1 line/index) or a scalar (all in one line with embeded newlines). See here for more information on qx() and ``.
However, if you're interested in portability (not everyone may have wget installed on their system or have access to it) and this is for more than just a quick-and-dirty, one-use script, you might consider using the LWP module. LWP::Simple should do what you're looking to do with wget, or you can use LWP::UserAgent for more control.
Your call. =)
bbfu
|
|---|