in reply to Re: Pattern matching in perl
in thread Pattern matching in perl

More portable to use File::Spec and splitpath rather than hardcoding a platform dependent separator . . .</nitpick>

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^3: Pattern matching in perl
by Anonymous Monk on Jul 02, 2022 at 17:32 UTC

    Good point. I assumed that in this case the '/' was the chosen field delimiter in the input file, but all the OP said was (paraphrased) "I have a file that looks like this ...". If the input file actually contains file names, yours is the way to go unless we know they are POSIX-format names.