hi,
i want to send my perl output to a notepad. is it possible..
for instant,
my perl result with some dna sequence should be copied to a new text file. is it possbile... can any one help me.
hi,
i want to send my perl output to a notepad. is it possible..
for instant,
my perl result with some dna sequence should be copied to a new text file. is it possbile... can any one help me.
Well you could direct the output to a file, then invoke notepad with that file.
Would that work?
Making it one step shorter could get unbelievably messy in a hurry, and for what benefit?
As Salem says, redirect the output to a file. For example, lets say I have a script called "my_program.pl" that prints output onto the screen. If I want to have that output go into a file instead, so I can open it with Notepad or some other program, I would enter perl my_program.pl > my_output.txt
on the command line (in the cmd box in Windows). This results in the output of the program going into a new file called my_output.txt instead of displaying on the screen.
I guess a simple solution would be to change your print to this:
$file = "somefileyouwanttostoreto.txt";
open(OUT, ">$file");
print OUT "strings that you want to output to file";
close(OUT);
Not too hard to actually include the file itself in your code,
Basically if you're currently doing "print" you would just replace it with "print OUT" in the cases where you want to output.
The Filename can be somewhat dynamic in that you can make it's name based on the current date/iteration of your file.
Thank you,
onaclov
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.