Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: space saving wanted!

by smitz (Chaplain)
on Apr 23, 2003 at 10:11 UTC ( [id://252502]=note: print w/replies, xml ) Need Help??


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

Why not get rid of that pesky loop?
my ($calc1, $calc2, $calc3, $calc4, $calc5, $calc6, $calc7); print $calc1; print $calc2; print $calc3; print $calc4; print $calc5; print $calc6; print $calc7;
Smitz

Replies are listed 'Best First'.
Re: Re: Re: space saving wanted!
by demerphq (Chancellor) on Apr 23, 2003 at 10:15 UTC

    Well, lets see. The OP asked for a way to use a loop to reduce his typing. He also is unlikely to want to _only_ print the variables involved. That could lead to serious code duplication. Also if you are being facetious then why not get rid of all those pesky print statements?

    print join($/||"",$calc1, $calc2, $calc3, $calc4, $calc5, $calc6, $cal +c7);

    ---
    demerphq

    <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-06-14 22:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.