I want to write all(5) user lines from STDIN into a file.
This is my code, it doesn't work:
================================
#!/usr/perl5/bin/perl
open (TMPMSG,">tempFile.txt");
while (<STDIN>) {
print TMPMSG $_;
}
close (TMPMSG);
================================
I tried many version of this code but it never works.
I'm missing something.
Could someone please help
This is my code, it doesn't work:
================================
#!/usr/perl5/bin/perl
open (TMPMSG,">tempFile.txt");
while (<STDIN>) {
print TMPMSG $_;
}
close (TMPMSG);
================================
I tried many version of this code but it never works.
I'm missing something.
Could someone please help