[oclug]Really basic Perl help
Bart Trojanowski
bart-oclug at jukie.net
Sat Jan 4 15:54:55 EST 2003
* B McKee <b_mckee at myrealbox.com> [030104 13:20]:
> Can somebody take a look at this and explain the results to me? I'm
> obviously not reading this documentation right... Please keep in mind I'm no
> programmer...
I am confused as to what you are thing to accomplish with
while (<DATA>) {
$a = $a.( /Three/../Three/ ) ;
}
The line tests to see if the string "Three" is a substring of the line
just read from <DATA> (ie the $_ string). If not present then nothing
is appended to the $a, since ( () .. () ) produces an empty string. If
the "Three" substring is matched then the ( 1 .. 1 ) would be appended
to the $a string, but I would expect this to produce "1" not "1E0"...
1E0 is 1 (in engineering notation), but am not sure why.
So, again, what are you trying to do?
B.
--
WebSig: http://www.jukie.net/~bart/sig/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://tux.oclug.on.ca/pipermail/oclug/attachments/20030104/1ece4d5b/attachment.bin
More information about the OCLUG
mailing list