On Sat, 24 Jan 1998, Marek Jedlinski wrote:
Webmarquee Administrator wrote:
#!/usr/bin/perl
$x = <STDIN>;
STDIN works on a line-by-line basis, doesn't it? By calling it only
once, you only receive one (the first) line of the input. You seem to
need the WHILE loop, as in:
open (FILE,">test.data");
while (<STDIN>) {
print FILE $_;
}
Or better, slurp it all into an array with
@x = <STDIN>;
print FILE @x;
close (FILE);
close (FILE);
This works for me. HTH,
marek
--
Invalid thought. Close all mental processes and restart body.
Largactil Café http://www.lodz.pdi.net/~eristic/index.html
Send message with GET PGP_KEY in subject for PGP public key.
Hail Eris. *plonk* trolls. Fight spam: http://www.cauce.org/
-------------------------------------------------------
Rune Mossige Tlf(Private): (+47) 514 24 771
Brekkeveien 19 Tlf(Work): (+47) 515 98 922
N-4062 Klepp Stasjon Fax(Work): (+47) 515 98 999
NORWAY Mobil: (+47) 908 71 024