"be consistent" | |
PerlMonks |
Re^4: What is the meaning of this line in Perl on linux?by Marshall (Canon) |
on Mar 29, 2022 at 03:58 UTC ( [id://11142479]=note: print w/replies, xml ) | Need Help?? |
Ok. Excellent point!
You point out what was probably the cause of my vaguely remembered problem: I think we are in 100% agreement about file paths within Perl. Perl itself will always get forward slashed file names. Always use forward slash for file paths within Perl programs. There is an exception if you want to launch a Windows system command. That may barf due to conflicts between an option switch vs a file path.
If you need to do a translation for that reason, I would put a comment in the code as to why the "/" is being translated to "\". Your suggestion about tr is also to be commended. For a one 2 one translation, nothing beats tr for performance.
In Section
Seekers of Perl Wisdom
|
|