Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: adding an IF to a push

by GrandFather (Saint)
on Jun 28, 2006 at 04:03 UTC ( [id://557920]=note: print w/replies, xml ) Need Help??


in reply to adding an IF to a push

If I understand what you want to achieve then something like this would seem to be what you are after:

if ($this eq "true") { my $img = get($image); my ($height, $width) = imgsize(\$img); push @array, $string =~ m#stuff#g if $height < $max_h && $width < +$max_w; }

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: adding an IF to a push
by sulfericacid (Deacon) on Jun 28, 2006 at 04:10 UTC
    This post like the one from the other day asking for a regex to push images onto. If that's the case, that regex would have to match prior to testing it's size.

    Though I could be wrong entirely. I'll link the node if ever I find it

    UPDATE: looked and looked and cannot find it. Maybe it was Tek-Tips or another site I'm thinking of.



    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://557920]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-19 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found