Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: First program revisited

by kabel (Chaplain)
on Nov 28, 2002 at 22:46 UTC ( #216390=note: print w/ replies, xml ) Need Help??


in reply to First program revisited

too tired to answer directly to the code, but for the last two questions see this code:

use strict; use warnings; my @numbers = 4 .. 6; my $number_of_trailing_zeros = 3; my $commify_at = 3; @numbers = map { $_ .= "0" x $number_of_trailing_zeros; $_ =~ s/(\d{$commify_at})$/,$1/; $_; } @numbers; print "@numbers";
btw is there a special reason why some write use warnings before use strict?

anyway, HTH ;)


Comment on Re: First program revisited
Download Code
Replies are listed 'Best First'.
Re: Re: First program revisited
by mooseboy (Pilgrim) on Nov 29, 2002 at 08:04 UTC

    Thanks to all for the help. Never really thought about the order of the pragmas, maybe it's the subconscious mind attempting to imitate the order of:

    #!/usr/bin/perl -w use strict;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (15)
As of 2015-07-31 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls