Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I believe I mentioned this before somewhere but (probably just in the CB, actually):
Sadly, although join(undef,@F) needn't emit a warning when @F contains fewer than 2 items, it does. Yes, it still isn't perfect (but I hope it helps some). I'm sure you know where to apply the patch. $^A doesn't appear to be used (for "auto-split separator"), last I checked. Update: I was trying to think how to wrap this nicely into a module and also that the separator needn't be the same at each point, when I decided the way to do both would be to have the module provide a routine that replaces the old @F values with the new into $_ in-place.
And I'd also like a module that ties up this trick for avoiding using $& (and capturing) that is also more useful (and faster) than either so I don't have to look up the formula each time. (: - tye In reply to Re: Does Perl 5 (or 6?) need another built-in variable for the -F switch? (re)
by tye
|
|