by removing "<" from open(). this still allows you to pass files too, keeping things "backwards-compatible"join.pl "sort -t, A.csv |" "grep LALA B.csv | sort -t, |"
this made me happy.
upon some further reflection, i think that this concept is more useful in OO code, for instance instead of implementing a method such as getFilename( ) you may want to use getFilehandleExpr( ) which is then passed to open($fh, $self->getFilehandleExpr( )). This gives you more flexibility later on when subclassing or implementing setFilehandleExpr( ) since the EXPR passed to open( ) is really a language of itself.
An example of using this technique would be implementing getFileHandleExpr( ) to write out to netcat or gpg or a file.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: passing pipes on the command line
by itub (Priest) on Mar 23, 2005 at 14:59 UTC | |
by Mugatu (Monk) on Mar 23, 2005 at 17:30 UTC | |
by itub (Priest) on Mar 23, 2005 at 17:35 UTC | |
by iradik (Novice) on Mar 23, 2005 at 19:36 UTC | |
by Mugatu (Monk) on Mar 23, 2005 at 20:39 UTC | |
by ambrus (Abbot) on Mar 23, 2005 at 21:03 UTC |