ironpaw has asked for the wisdom of the Perl Monks concerning the following question:
Any ideas appreciated.#!/usr/bin/perl -w open(CSV, "/tmp/doctime.txt"); @title = <CSV>; for ($i = 0; $i < scalar(@title); $i++) # a for loop has three +fields. the first sets a counter ($i=0) { ($file[$i], $date[$i]) = split(",", $title[$i]); # split the line +into its 2 arrays } for ($a = 0; $a < scalar(@file); $a++) { $access=$date[$a]; $filez = $file[$a]; $filez =~ s/\ /\\ /g; $filez =~ s/.\s$//; print "File name # $filez\n"; print "Previous date # $access\n"; utime $access, $access, "$filez" || die print "couldn not set utime fo +r $filez\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: spaces in filenames
by theguvnor (Chaplain) on Feb 03, 2003 at 01:35 UTC | |
by ironpaw (Novice) on Feb 03, 2003 at 04:36 UTC | |
by theguvnor (Chaplain) on Feb 03, 2003 at 14:40 UTC | |
|
Re: spaces in filenames
by Coruscate (Sexton) on Feb 03, 2003 at 02:33 UTC | |
|
Re: spaces in filenames
by fokat (Deacon) on Feb 03, 2003 at 01:39 UTC | |
by dvergin (Monsignor) on Feb 03, 2003 at 03:09 UTC | |
by fokat (Deacon) on Feb 03, 2003 at 03:23 UTC | |
by MarkM (Curate) on Feb 03, 2003 at 03:46 UTC | |
|
Re: spaces in filenames
by ironpaw (Novice) on Feb 05, 2003 at 02:54 UTC |