William M West wrote:
> 
> i'd like to take a couple of strings to concatonate to a path...
> 
> here's my start the code:::
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use diagnostics;
> 
> my $date = `date`; #not sure about redirecting output to $path!
> 
> $date=~s/( ){3}/; #i think this is proper to just take the string
>                         #up to the third whitespace character...
> 
> my $filename = append_date_to_rest_of_filename();

You can use localtime() and sprintf() to get most of the formatting you
need or POSIX::strftime for really good formatting.  Also localtime() in
scalar context returns a string similar to that of the date program.

perldoc -f localtime
perldoc -f sprintf
perldoc POSIX



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to