Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: create file with current date for name

by tachyon (Chancellor)
on Aug 07, 2001 at 20:09 UTC ( #102831=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    print "\n\n";
    # result is 20010807.summary
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my $ymd = sprintf("%04d%02d%02d",$year+1900,$mon+1,$mday);
    my $outfile = "$ymd.summary";
    print $outfile, "\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://102831]
help
Chatterbox?
[stevieb]: cheers beech. twas totally my mistake, and I got bit. When things work for so long without issue, one becomes complacent (ie. replace we/one with I ;) I've been copy/pasting that around for a few years without a hiccup, so when...
[stevieb]: choroba pointed that out, I was just, you know, *sigh*. In effect, I was lucky and fortunate
[stevieb]: Kind of like my regex-fu went out the window, but only while looking at that specific file ;)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-07-25 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (383 votes). Check out past polls.