Roee Rubin wrote:
> The end result should look like the following
>
> item1 item2
> item3 item4
> item5 item6
> item7 item8
>
> basically, for every second item I need to print a \n
I'd probably keep a running counter in my loop:
hi,
first you need to open a file for output then go into the hash
open(FILE, ">outputfile") or die "cannot open file $!";
select(FILE);
while (($key,$value) = each %hash)
{
print FILE "$key $value\n";
}
select(STDOUT);
hope this is what you need :o)
___
Roee Rubin wrote:
>
> Hello,
>
> I am a little brain dead - so if this question is too easy, I apologize.
>
> I have a hash with certain value that I need to spit in to a text file. The
> end result should look like the following
>
> item1 item2
> item3 item