in reply to Re^3: Perl appending \ or / based on windows or linux
in thread Perl appending \ or / based on windows or linux
use strict; use warnings; use File::Spec::Functions qw(:ALL); use feature 'say'; my $testpath = catdir('foo','bar'); #say $testpath; my ($sepchar) = $testpath =~ m/^foo(.+)bar$/ or die 'Separation character identification failed'; say $sepchar;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Perl appending \ or / based on windows or linux
by Anonymous Monk on Oct 07, 2014 at 21:39 UTC |