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

Re: Re: space saving wanted!

by Anonymous Monk
on Apr 23, 2003 at 14:01 UTC ( #252546=note: print w/replies, xml ) Need Help??


in reply to Re: space saving wanted!
in thread space saving wanted!

How could i do this if i wanted to test each $count for being over 0 ?? e.g.
if ($calc < 0 ) { print "$some_variable\n"; }

Replies are listed 'Best First'.
Re: Re: Re: space saving wanted!
by vek (Prior) on Apr 23, 2003 at 15:44 UTC
    Well demerphq already gave you 99.9% of the code, just test to see if each variable is greater than zero:
    my ($calc1, $calc2, $calc3, $calc4); foreach my $calc ( $calc1, $calc2, $calc3, $calc4 ) { print "$calc\n" if ($calc > 0); }
    -- vek --

      It seems to me that annonymok should review perlsyn. What do you think?


      ---
      demerphq

      <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
        Absolutely, by the looks of things it certainly wouldn't hurt would it :-)

        demerphq++

        -- vek --

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2022-12-10 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?