Tommy Nordgren wrote:
>
> On 20 okt 2006, at 21.31, Goke Aruna wrote:
>
>> On 10/20/06, John W. Krahn <[EMAIL PROTECTED]> wrote:
>>>
>>> Goksie wrote:
>>> > Thanks all for the past help
>>> >
>>> > Can someone advice me on how i can open .dat file in perl script?
>>>
>>> open my $fh, '<', '00016367.DAT' or die "Cannot open '00016367.DAT'
>>> $!";
>>>
>>>
>>>
>>> John
>>> -- 
>>
>> thanks John
>>
>> Each time i used it that way its giving me
>>
>> GLOB(0x22519c)
>>
>
>     This might occur because you are trying to print the file handle
> instead of reading FROM it.
>     
>> thanks
>>
>> goksie
> Thank you,

the code is as follow

#!c:/perl/bin/perl
 use warnings ;
 use strict ;
 my $fl = "c:/Perl/CDR_MSC_DAT/00016363.DAT";
 { local ($\) = ("\n") ;
  open my $fh, '<', $fl or die "open '$fl': $!" ;
  while (<$fh>)
  {
    print $fh;
  }
      }

the output is
perl fdmacdr.pl
GLOB(0x225218)
GLOB(0x225218)
GLOB(0x225218)
its not a music file... cos another program though proprietary has
opened it.

goksie

> ------------------------------------------------------
> "Home is not where you are born, but where your heart finds peace" -
> Tommy Nordgren, "The dying old crone"
> [EMAIL PROTECTED]
>
>
>
> --To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>


-- 
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