Aditi Gupta wrote:
> Hi everybody,
> 
> Can we use substr function for a string like:
> $file = atom 12 N  VAL  A  1  12.435  13.66 34.6  32.1 32   a N
> can the decimal numbers be extracted using 
> $x= substr($file, offset, length)
> (the exact field lenghts of each field are known).
> 
> Thanks in advance..
> 

Did you try? Did it fail?

Likely easier with 'unpack',

perldoc -f unpack
perldoc -f pack

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to