Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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,

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2022-08-11 01:33 GMT
Find Nodes?
    Voting Booth?

    No recent polls found