[Chicago-talk] perl touch

tiger peng tigerpeng2001 at yahoo.com
Tue May 9 11:47:01 PDT 2006


Thanks Shawn. But it dose not work:

1)perl -e 'open $fh, "<", "what" or die $!'
No such file or directory at -e line 1.

2)touch does not truncate the existing file.

Ge

--- Shawn Carroll <shawn.c.carroll at gmail.com> wrote:

> open my $fh, '<', $filename;
> print $fh "";
> close $fh;
> 
> On 5/5/06, tiger peng <tigerpeng2001 at yahoo.com>
> wrote:
> > Hello,
> >
> > Can you help me to "touch" a file in perl without
> > using backticks? I do not feel comfotable with
> > backticks without catching its output.
> >
> > I know utime only works for the files already
> exist.
> >
> > Ge
> > _______________________________________________
> > Chicago-talk mailing list
> > Chicago-talk at pm.org
> > http://mail.pm.org/mailman/listinfo/chicago-talk
> >
> 
> 
> --
> shawn.c.carroll at gmail.com
> Perl Programmer
> Soccer Referee
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
> 



More information about the Chicago-talk mailing list