Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: foreach loop and creating files with "$_"

by xyzzy (Pilgrim)
on Jul 22, 2014 at 04:24 UTC ( #1094585=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for (1..$num) {
      open my $fh, '>', sprintf "temp%02d",$_; # temp01, temp02, etc.
      ...
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2021-05-13 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (134 votes). Check out past polls.

    Notices?