laziness, impatience, and hubris | |
PerlMonks |
Super newbie array questionby Anonymous Monk |
on May 22, 2023 at 21:48 UTC ( [id://11152371]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I have recently embarked on my journey in Perl and I am already stuck with my first (most likely super trivial problem: I found a code snippet that I want to practice changing, where the example has the following array:
and the command:
So, my problem is, how can I create the @ranges array in the way it's written in this example? I've been trying several ways, like:
but the code does not run (it runs properly using the above snippet, but somehow the array must be written in the form I have specified above, else the grep command does not work. Can you help me please?
Back to
Seekers of Perl Wisdom
|
|