M
mikeybe
I can't seem to get this to work properly. I am running trying to print
the output of the commands that were piped, but I am only getting part
of the expected output.
Here is the code:
------------------------
@cat_progs = `selit -t"BOOK" -oC | selcat -iC -oeq -q">20060415"
-e{100},{245}`;
foreach (@cat_progs) {
print $_;
}
------------------------------
The commands will NOT be obvious. They are for use in a proprietary
program. However, the behavior is unexpected. For example,
If I run this command in the shell (same as in the script): selit
-t"BOOK" -oC | selcat -iC -oSeq -q">20060415" -e{100},{245} ... I get
the output that I WANT:
Roberts, Nora.|Carnal innocence / Nora Roberts.|20060425|
Coulter, Catherine.|Riptide / Catherine Coulter.|20060425|
O'Dell, Tawni.|Back roads / Tawni O'Dell.|20060425|
But when I run the script (which inserts the same command between the
ticks), I get this:
-|-|20060425|
-|-|20060425|
-|-|20060425|
I know it must be missing something easy, but I can't find it and I
have been pulling my hair out. Can anyone help?
Thanks!
Mike
the output of the commands that were piped, but I am only getting part
of the expected output.
Here is the code:
------------------------
@cat_progs = `selit -t"BOOK" -oC | selcat -iC -oeq -q">20060415"
-e{100},{245}`;
foreach (@cat_progs) {
print $_;
}
------------------------------
The commands will NOT be obvious. They are for use in a proprietary
program. However, the behavior is unexpected. For example,
If I run this command in the shell (same as in the script): selit
-t"BOOK" -oC | selcat -iC -oSeq -q">20060415" -e{100},{245} ... I get
the output that I WANT:
Roberts, Nora.|Carnal innocence / Nora Roberts.|20060425|
Coulter, Catherine.|Riptide / Catherine Coulter.|20060425|
O'Dell, Tawni.|Back roads / Tawni O'Dell.|20060425|
But when I run the script (which inserts the same command between the
ticks), I get this:
-|-|20060425|
-|-|20060425|
-|-|20060425|
I know it must be missing something easy, but I can't find it and I
have been pulling my hair out. Can anyone help?
Thanks!
Mike