I would think the 2nd would be slowest since there is an extra step of getting the right filehandle from the string...
$ perl -MO=Deparse -e 'readline(STDIN)'
readline 'STDIN';
-e syntax OK
Not sure when that happens though. (One time penalty?)
I would expect the fourth to be about as quick as the others (after the open) as it's just dup'ing STDIN. Is it slower to store a filehandle in a lexical? (I wouldn't think so but have no real clue.)
shrug
Not that any of this changes the fact that it shouldn't matter to the OP. :-)
-sauoq
"My two cents aren't worth a dime.";
|