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

Re: space saving wanted!

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


in reply to space saving wanted!

Have you considered using an array? If thats really not possible, you could:
#!perl $calc1 = 1; $calc2 = 15; $calc3 = 7.5; $calc4 = 9; for (1..4) { my $var = 'calc' . $_; print $var, "\t", $$var, "\n"; } __END__ calc1 1 calc2 15 calc3 7.5 calc4 9
But that really is horrible. You should definately be using an array.

Smitz

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-06-17 19:52 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.