Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Getting correct filename

by young perlhopper (Scribe)
on Aug 10, 2000 at 19:34 UTC ( #27305=note: print w/replies, xml ) Need Help??


in reply to Getting correct filename

I'm not totally clear on what you are trying to do but maybe something like this will get you started:

# $infile is assumed to be the file you are reading... # I'm assuming you know what you want to put in the out # file name and how to get it... my $otherinfo = &getotherinfo; # the \d{2} is the day, make it \d{1,2} if you want to # allow weblog.2Jul as well as weblog.23Jul # # the \w{3} catches the month abbreviation (my $outfile = $infile) =~ s/\.\d{2}\w{3}/-$otherinfo/; # do this if you want to use an absolute pathname... $outfile = $pathname . $outfile; open(OUTFILE, "> $outfile");

If i totally missed what you were trying to do, let me know.

Good luck,
Mark

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2023-09-22 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?