Re: using file globs and regex



Ben Morrow wrote:
[please don't top-post]

Quoth Steve C <smallpond@xxxxxxxx>:
- SC.

then it asks grep for a scalar.
but when you call it without the parens
it asks grep for a list

Please don't talk nonsense.

Ben


Too subtle, I guess.
SC
.



Relevant Pages

  • Re: Is Perl still worth learning?
    ... the internal behavior of a function changes depending on whether you assign its return value into a scalar or an array. ... It depends on whether you evaluate the function a list context ... Getting back to Perl and its notion of scalar vs. list context, ... For example, in Perl, there is a "grep" function. ...
    (comp.programming)
  • Re: Is Perl still worth learning?
    ... whether you assign its return value into a scalar or an array. ... It depends on whether you evaluate the function a list context ... The context does not influence the internal behavior of the ... In list context, "grep" returns the list. ...
    (comp.programming)
  • Re: using file globs and regex
    ... then it asks grep for a scalar. ... When you put $fn2 inside the parens then ... What I'm confused about is the parens around the $fn2? ...
    (comp.lang.perl.misc)
  • Re: match three digit number using regular expression
    ... > foreach (@comp) ... Why are you using grep() to match one scalar? ...
    (comp.lang.perl)
  • Re: Grep a variable
    ... I am trying to grep a variable from a scalar value. ... grepis for lists, and you ... See perlre or perlretut for details. ...
    (perl.beginners)