Re: script that passes args to subroutine works ok, after I unpack the args. But perlcritic says I'm not unpacking?

2017-02-25 Thread khalil zakaria Zemmoura
Naming multiple variables with the same name like you did ($args, %args) is a bad idea. because when you want to access the value of the hash %args ($args{FN}) you are accessing in reality what was shifted in the scalar $args and not the hash %args because perl use simbolic reference. here is a li

Re: script that passes args to subroutine works ok, after I unpack the args. But perlcritic says I'm not unpacking?

2017-02-25 Thread ZEMMOURA Khalil Zakaria
On Sun, Jan 15, 2017 at 12:45:41PM -0800, al...@myfastmail.com wrote: > Hi > > On Sun, Jan 15, 2017, at 12:23 PM, Илья Рассадин wrote: > > I think, you can use this aproach > > If I use either of those > > > sub modrec { > - my %args = %{ shift @_ }; > +

Re: interesting regex delimiters

2017-02-25 Thread Andrew Solomon
Thanks Chas., that's interesting! Here's my summary of what I've learnt from this: 1. The regex $foo =~ "\Asome string\Z" is equivalent to $bar = "\Asome string\Z"; # ends up as 'Asome stringB' with a warning $foo =~ /$bar/; i.e evaluate the string first and then stick it into the regex delimi