kulls has asked for the wisdom of the Perl Monks concerning the following question:
#!C:\perl\bin\perl use strict; use warnings; my %typehash = ( 'tomcat' => '\\d\$\\logs\\tomcat', 'tomcatweb' => '\\d\$\\logs\\web', 'apache' => '\\d\$\\logs\\Apache' ); sub getLog { my ($a,$type)=@_; my $server=$a; my $dir = "\\\\$server".$typehash{$type}; print "\n $dir "; chomp(my $meh = `dir /b /O:D $dir`); print $meh; } &getLog("test.control.com",'tomcat');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing Windows Path from Perl script
by BioLion (Curate) on Aug 13, 2010 at 14:17 UTC | |
|
Re: Accessing Windows Path from Perl script
by VinsWorldcom (Prior) on Aug 13, 2010 at 14:22 UTC | |
|
Re: Accessing Windows Path from Perl script
by roboticus (Chancellor) on Aug 13, 2010 at 14:58 UTC | |
|
Re: Accessing Windows Path from Perl script
by jonadab (Parson) on Aug 13, 2010 at 19:26 UTC |