SPUG: itm 60 in effective perl programming

John W. Krahn krahnj at telus.net
Thu Feb 24 01:38:05 PST 2005

Florentin Ionescu wrote:
> perl -pe 's/\n/" " . <>/e' file
> is presented in Effective perl programming as program to join lines from 
> a file.
> what does it mean <> in this context ? - I looked into perlop and perlre 
> but can't figure out haw it works.

<> is the readline operator.

perldoc -f readline

In this context (scalar) it means to read a single line from the current 
filehandle (either ARGV or STDIN).

use Perl;

More information about the spug-list mailing list