Madam has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use File::Spec; my $str = " /home/madam ~/madam"; my @strarray = split(" ",$str); for (@strarray){ if ( -d $_){ print "path present : $_\n"; } else { print "path not present : $_\n"; } }
but both paths are same. why it is not understanding ~/madam? Thanks, Madamthe output is : path present : /home/madam path not present : ~/madam
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to expand home directory ~
by derby (Abbot) on Jun 02, 2005 at 12:26 UTC | |
by PodMaster (Abbot) on Jun 02, 2005 at 12:30 UTC | |
by derby (Abbot) on Jun 02, 2005 at 13:14 UTC | |
|
Re: how to expand home directory ~
by Joost (Canon) on Jun 02, 2005 at 12:05 UTC | |
|
Re: how to expand home directory ~
by muntfish (Chaplain) on Jun 02, 2005 at 12:09 UTC | |
by muntfish (Chaplain) on Jun 02, 2005 at 12:31 UTC |