more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I have scoured the Perl user guides and beginner tutorials and couldn't find an answer to my question (This is just a disclaimer in case anyone tells me to 'read the fine manual' ;). I have a few scripts that interact with each other via system commands. One script passes a website url to another script using the following system command: perl getrequest.pm http://www.google.comIn the 'getrequest.pm' script I have defined the following variable: my $url = $ARGV[0];I have used $ARGV[0] because later on the script gets passed another argument as $ARGV[1] I am trying to then split the $url variable further so that I can get the bare host name 'google.com' for example (I need both the bare host name and the full url for further processing). I have tried a number of ways using the split command but it doesn't seem to be working. I would really appreciate some advice and whether split is the right function to use or not? In reply to [SOLVED]Unable to split $ARGV[0] variable. Can it be done? by Doozer
|
|