gitarwmn has asked for the wisdom of the Perl Monks concerning the following question:
The following doesn't seem to be working and I can't figure out why...
Anyone have any suggestions?open(HANDLE, "|cmd ss get $/Tate_SP2/$dir/$fname -Ybarbarat,12 +345|" || die "Couldn't run process:$!" );
#!c:/perl/bin/Perl.exe use strict; use warnings; my @filesaffected; my $builddir = "C:\\Source\\Tate_8.4\\Click2Coach"; my $dir; my $fname; my $tatedir = "C:\\Source\\Tate_8.4"; main(); sub main{ #get files from vss my $filepath = "C:\\Source\\files.log"; open (IN, $filepath) || die "Can't open $filepath:$!"; while ( my $line = <IN> ) { chomp $line; next if ($line =~ /^\s*$/ or # blank lines $line =~ /^\s*#/); # comments push(@filesaffected, $line); } close IN; for (@filesaffected){ ($dir, $fname)= $_ =~ /^(.*?)[\\\/]([^\\\/]+)$/; $dir =~ s{\\}{/}g; open(HANDLE, "|cmd ss get $/Tate_SP2/$dir/$fname -Ybarbarat,12 +345|" || die "Couldn't run process:$!" ); close HANDLE; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: open handle
by bart (Canon) on Dec 06, 2006 at 20:35 UTC | |
by gitarwmn (Beadle) on Dec 06, 2006 at 20:51 UTC | |
|
Re: open handle
by Joost (Canon) on Dec 06, 2006 at 20:34 UTC | |
|
Re: open handle
by Crackers2 (Parson) on Dec 06, 2006 at 21:51 UTC | |
by gitarwmn (Beadle) on Dec 06, 2006 at 22:39 UTC |