in reply to making a list and saving results

I am not sure what you want. I am guessing that you want to create a file which gets appended with the range of numbers that are entered.
You will have to open a file, append the data to it.
#!/usr/bin/perl print "enter the START number: \n"; $number1 = <STDIN>; print "enter END number: \n"; $number2 = <STDIN>; @list=($number1..$number2); print "@list\n"; # if the file already exists. open OUTFILE, ">>/path/to/outfile" or die "Cannot open $!\n"; # if you want to create new file each time the program is executed. # open OUTFILE, ">/path/to/outfile" or die "Cannot open $!\n"; map { print OUTFILE $_, "\n"; } @list; close (OUTFILE);
Hope this helps.

Replies are listed 'Best First'.
Re^2: making a list and saving results
by surfbass (Initiate) on May 29, 2005 at 21:00 UTC
    well it made the list and everything, but instead of the numbers each on a new line, its little squares, and they are all bunched up...i need each number on a new line
      Try 'type filename' or 'cat filename', depending on which machine you are on.