Incidentally, even when posting minimal code it is sensible to use the open() or die semantic, especially when showing stuff like this to a newbie, who is probably already exposed to (bad) examples of unchecked open()s.open MYHANDLE, "GET http://www.perlmonks.org|";
Whatever... is this really supposed to work? AFAICT this is just a piped open(), so it depends on the availability of the "GET" command (which BTW I've never heard) and thus is at best system-dependent. Isn't it that you meant "wget", maybe?
Speaking of which, ideally it would be nice to have an open mode (for the three args form of open(), for reasons of backward compatibility) doing exactly this by calling the appropriate modules behind the scenes, a la
or a {layer,discipline}, maybe:open my $fh, 'web', 'http://www.perlmonks.org' or die $!;
(Something vaguely along these lines has been discussed in p6l, but on a different level - of course!)open my $fh, '<:web', 'http://www.perlmonks.org' or die $!;
Just a few random thoughts...
In reply to Re^2: Extract Web Page
by blazar
in thread Extract Web Page
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |