Just a little correction on your explenation:
$/="o" || "p" || "q"; will assign 'o' to $/, not 'q'.
the || short circuits, meaning it will assign the *first* true value, not
the last.
in short, 'p' or 'q' won't even be evaluated, since 'o' evaluates to true.
you might have seen syntax like:
open (I, "foo.txt") || die $!
if you're explanation would be correct, this script would always die....
try it, and print it out...
regards,
Jos Boumans
> On Sun, Aug 19, 2001 at 04:49:30AM +0900, Pakhun Alhaca wrote:
> > open(FILEIN, "C:\\corpus.txt");
> > open(FILEOUT, "C:\\japanesesentences.txt");
> > $/="o" || "p" || "q"; #three of them written originally
>
> This assigns "q" to $/. For one, you can't multiple things to split on in
> $/, for another your syntax is incorrect; the syntax '"o" || "p" || "q"
> evaluates to the last true value in the sequence, which is "q".
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]