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.
In reply to Re^4: Perl appending \ or / based on windows or linux
by kennethk
in thread Perl appending \ or / based on windows or linux
by sravs448
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |