[aclug-L] Re: Perl help!!
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I just ran this script on both WinNT and Win95 and it ran fine. I have
ActivePerl version 5.005_03. You might want to upgrade to that.
--
Sanjay
On Mon, 20 Dec 1999, Mohammad Islam wrote:
> Hello all,
>
> First Merry christmas and Happy new year to you all!! :))
>
> Ok now down to business...
>
> I have following blashphemous question:
>
> Anybody here has used perl on win32(Activeperl version 5.005_02)..say on
> winNT?(Geezzz)
>
> I am having some problem with perl's "format" on my winNT system.
>
> Here is a description of my problem:
>
> I have the following file on my c:\ drive named data.txt. It has the
> following format:
>
> Linus:Trovalds:ManOfTheYear:1999
> Eric:Raymond:36milliondollarman:1999
>
> Now i have the following perl code to open the file, parse the data and
> show em to the screen in a defined format:
>
> ##Begin code
>
> open(DATA, "c:\\data.txt");
>
> while(<DATA>)
> {
>
> ($first, $last, $status, $year) = split(/:/);
> write;
> }
> format STDOUT =
> @<<<<<<<<<< @<<<<<<<<<< @<<<<<<< @<<<<<<<<<<<<<<<
> $first, $last, $status, $year
> .
>
> ##End code
>
> But when i run it from the command prompt it gives the following error:
>
> Format not terminated at formattest.pl line 14, at end of line
> Format not terminated at formattest.pl line 14, at end of line
>
> Hmmm..same script run flawlessly on my linux machine. I do not have a
> clue here. I have terminated format at the end (Notice the .)
>
> Anyone can shed some light on this?? Do i neeed to do something special
> to terminate format for a win32 system?
>
> Your insights would be most appreciated.
>
> Thanks.
>
> Mohammed
>
|
|