[Chicago-talk] perl touch

Kent Cowgill kent at c2group.net
Tue May 9 12:16:07 PDT 2006


Ge:

See Shawn's more recent reply.

Also, you'll need to make sure that the user your program is running as
has appropriate permissions in the directory where your file is located.

On Tue, 9 May 2006, tiger peng wrote:

> 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
> >
>
> _______________________________________________
> 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