Fauzi Ashurex wrote:

> I'm running perl under NT using bash shell!
> 
> Why this does not work?
> +++++++++++++++++++++++++++++
> $NOW = `date '+%m%d%y'`;
> print "$NOW";

Because that's the way you call the Unix date command,
not the NT date command.

Depending on how you have your PATH and COMSPEC (or shell in Config?)
set up,
it may be calling either (1) the NT DATE command, which doesn't take
arguments
like that, or (2) the date command that came with your bash shell
environment.

Anyway, that's a really poor way of printing a timestamp.

Look at the perlfunc manpage, under localtime().

for instance, 

        print scalar(localtime());

will print a long date stamp.

And when called in an array context, localtime() returns all the fields
you'd
possibly want. Note that the base for months is 0.


-- 
Ned Konz
currently: Stanwood, WA
email:     [EMAIL PROTECTED]
homepage:  http://www.bike-nomad.com

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to