Beefy Boxes and Bandwidth Generously Provided by pair Networks BBQ
Just another Perl shrine
 
PerlMonks  

(Buzzcutbuddha - Formatting of question) - Re: one line programs

by buzzcutbuddha (Chaplain)
on Apr 16, 2001 at 01:28 UTC ( [id://72734]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to one line programs

your example would be easier to follow if enclosed in
<code></code> blocks.

It works similar to the PRE tags in HTML.

I imagine you were downvoted because the code is hard
to read:
{ while(/A\s+HREF\s*=\s*"(^"+)"/ig) { $foo{$1}=1; } } for(keys %foo) { print "\n"; }
Is this the code you had in mind?

Replies are listed 'Best First'.
Re: (Buzzcutbuddha - Formatting of question) - Re: one line programs
by lorenw14 (Initiate) on Apr 16, 2001 at 01:45 UTC
    Sorry about that, this is the first time that I have used this site and I was not quite sure how to use the but I think that I got it now. Yeah, the code that I was trying to convert to a one-liner was
    while(<>) { while(/A\s+HREF\s*=\s*"([^"]+)"/ig){ $foo{$1}=1; } } for(keys %foo){ print "<img src=\"$_\"><br>\n"; }
    Thanks for your help.
Re: (Buzzcutbuddha - Formatting of question) - Re: one line programs
by lorenw14 (Initiate) on Apr 16, 2001 at 01:48 UTC
    Sorry about that, this is the first time that I have used this site and I was not quite sure how to write in the code but I think that I got it now. Yeah, the code that I was trying to convert to a one-liner was
    while(<>) { while(/A\s+HREF\s*=\s*"([^"]+)"/ig){ $foo{$1}=1; } } for(keys %foo){ print "<img src=\"$_\"><br>\n"; }
    Thanks for your help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://72734]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.