Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Kudos.
I didn't think it's possible and the trick is to shell out the writing and opening to a shorter syntax. This might be considered dirty in a real Perl script but should be acceptable in a one-liner. And interestingly it should also work on windows. Point is Perl has no mean to print_and_open_if_necessary() So the next step is to ask myself if the semantics could be cleanly replicated in Perl... IMHO a tied hash %FH would be most elegant print $FH{">>$name"} $value I didn't try to search CPAN for similar solutions yet, cause I'm not sure how. Comments welcome. ..
Cheers Rolf In reply to Re^2: Split tab-separated file into separate files, based on column name (open on demand)
by LanX
|
|