Robert Citek schreef: > Why do these two commands not produce the same output? > > $ perl -le 'print join("--", split(/: /, "a: b"))' > a--b > > $ echo 'a: b' | perl -F'/: /' -lane 'print join("--", @F)' > a: b > > From reading 'perldoc perlrun' the -F option should behave just like > the pattern to split. What am I missing?
Use -MO=Deparse to investigate the regenerated Perl code. The '/: /' results in split(m[/:], $_, 0) Try '/:\s/' and '/:\x20/' too. It seems that a space in the -F-delimiter creates problems. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>