unixbhaskar, 2 months ago Nice! #perl #programming #language #regularexpression #shorthandnotation #efficiency
Nice!
#perl #programming #language #regularexpression #shorthandnotation #efficiency
splatt9990, 2 months ago @unixbhaskar a small caveat: if you're using an old version of Perl (pre-5.18) using these variables can cause a significant performance hit for your script. https://metacpan.org/dist/perl/view/pod/perlvar.pod#Performance-issues
@unixbhaskar a small caveat: if you're using an old version of Perl (pre-5.18) using these variables can cause a significant performance hit for your script.
https://metacpan.org/dist/perl/view/pod/perlvar.pod#Performance-issues
mjgardner, 2 months ago @splatt9990 @unixbhaskar Any code that isn’t immediately discarded will be read more often than entered. To prevent future readers, including yourself, from wanting to remove their tired eyeballs with a spoon, use https://perldoc.perl.org/English use v5.18; use English; something with a regexp say $MATCH; # not $& say $PREMATCH; # not $` say $POSTMATCH; # not $' perldoc perlvar documents #Perl’s predefined variables and “English” synonyms: https://perldoc.perl.org/perlvar#SPECIAL-VARIABLES
@splatt9990 @unixbhaskar Any code that isn’t immediately discarded will be read more often than entered.
To prevent future readers, including yourself, from wanting to remove their tired eyeballs with a spoon, use https://perldoc.perl.org/English
use v5.18; use English;
say $MATCH; # not $& say $PREMATCH; # not $` say $POSTMATCH; # not $'
perldoc perlvar documents #Perl’s predefined variables and “English” synonyms: https://perldoc.perl.org/perlvar#SPECIAL-VARIABLES
perldoc perlvar
Add comment