in reply to Re^2: save output of program in another file
in thread save output of program in another file
What environment are you running in? "Command line" is pretty vague.
A few pointers here:
is a great way to start a script in Perl since without them Perl won't complain much about what you are doing other than gross syntax errors. With the strictures in place you get told about more subtle issues that can help you get your code working the way you expect it to.use strict; use warnings;
In my humble opinion the one of the ten commandments of programming in any language is "Thou Shalt Catch Errors." Catching errors is another great step towards programming nirvana where you code does what you expect. There could very well be permission issues either reading a file or writing a file. Your code may not be executing where you think it is. All this and more can cause you issues.open THING,"<some_file.ext" or die "some_file.ext:$!"; open OTHERTHING,">some_other_file.ext" or die "some_other_file:$!";
Finally: what are you expecting your code to do in the first place? What does your input look like?
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: save output of program in another file
by bingalee (Acolyte) on Jun 06, 2013 at 20:55 UTC | |
by choroba (Cardinal) on Jun 07, 2013 at 07:14 UTC | |
by blue_cowdawg (Monsignor) on Jun 07, 2013 at 13:18 UTC |
In Section
Seekers of Perl Wisdom