any idea why it is happenning

It's probably that comma on line 21.

And if there is no comma on line 21, perhaps you could post your code as my ESP seems to be acting up this week :)

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

In reply to Re: problem with put function by BrowserUk
in thread problem with put function by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":