about matching in a list context
- From: sharma__r@xxxxxxxxxxx
- Date: 9 Oct 2006 05:14:01 -0700
Hello,
I don't understand this behavior of perl:
perl -lne 'print for /^(\d+\.\d+E-\d+)$/;' << EOF
***********
4.62972E-13
4.63098E-13
4.62983E-13
***********
EOF
returns corrrectly --->
4.62972E-13
4.63098E-13
4.62983E-13
Whereas if I do this :
perl -lne 'print for /^\d+\.\d+E-\d+$/;'
I get (from the exact same input as above) :
1
1
1
Now I want to know what's going on?
Thanks
Rakesh
.
- Follow-Ups:
- Re: about matching in a list context
- From: sharma__r
- Re: about matching in a list context
- From: Paul Lalli
- Re: about matching in a list context
- From: Eric Amick
- Re: about matching in a list context
- Prev by Date: Re: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.6 $)
- Next by Date: Re: about matching in a list context
- Previous by thread: Parsing and preserving comments
- Next by thread: Re: about matching in a list context
- Index(es):