in reply to Re: OS X troubleshooting help needed - parse filename & open file
in thread OS X troubleshooting help needed - parse filename & open file
I don't see how using File::Spec would improve this code, which is essentially what seems to be broken - although I won't know for sure until somebody is kind enough to test it on a mac:
my $inputfile; print "\nDrag and drop a file here:\n"; chomp ($inputfile = <STDIN>); $inputfile =~ s/^ *[\"\']?([^\"\']*)[\"\']?/$1/; # strip whitespace an +d quotes if (-e "$inputfile") {print "\nOK, file found\n";} else {print "\nERRO +R: file not found\n";}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: OS X troubleshooting help needed - parse filename & open file
by Your Mother (Archbishop) on Oct 17, 2010 at 19:32 UTC | |
by elef (Friar) on Oct 17, 2010 at 20:33 UTC | |
Re^3: OS X troubleshooting help needed - parse filename & open file
by Corion (Patriarch) on Oct 17, 2010 at 18:24 UTC | |
by elef (Friar) on Oct 17, 2010 at 19:01 UTC | |
by Corion (Patriarch) on Oct 17, 2010 at 19:42 UTC | |
by elef (Friar) on Oct 17, 2010 at 20:11 UTC | |
by elef (Friar) on Oct 17, 2010 at 20:21 UTC |
In Section
Seekers of Perl Wisdom