LeGo has asked for the wisdom of the Perl Monks concerning the following question:
In browsers I am able to just type in the IP and see what is being shared via network neighborhood, 'file://i.p.add.ress'. I am unsure on how to go about doing this in perl. I thought that I would be able to do this using LWP::UserAgent becuase of the 'file' option.
I am not sure where to go from what I have. If you could help I would appreciate it. Below is the code I have.
#!/usr/local/bin/perl -w use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent; $ua->agent("Mozilla/8.0 " . $ua->agent); my $req = HTTP::Request->new(GET => 'file://ip/COOLHITS/'); my $res = $ua->request($req); if($res->is_success){ print $res->content; }else{ print "Bad Luck this time\n"; }
As you can see this code looks a lot like LWP's example, but I can't figure out what to do with it. The output I get returned is "Bad Luck this time".
All help is appreciated.
LeGo
|
|---|