develooper Front page | perl.perl5.porters | Postings from September 2005

Re: [perl #36950] Bizarre warning message

Thread Previous
From:
Abigail
Date:
September 26, 2005 14:53
Subject:
Re: [perl #36950] Bizarre warning message
Message ID:
20050926215301.GH592@abigail.nl
On Fri, Aug 19, 2005 at 11:47:41AM +0200, Rafael Garcia-Suarez wrote:
> Mark-Jason Dominus (via RT) wrote:
> >         use Data::Dumper;
> > 
> >         open my($O), ">", "/tmp/out";
> >         print $O Data::Dumper->Dump([], []);
> >         print "OK\n";
> > 
> > 
> > This program generates the following output:
> > 
> >         Bareword found where operator expected at /tmp/bug.pl line 4, near "$O Data::Dumper"
> >                 (Missing operator before Data::Dumper?)
> >         OK
> 
> I can't reproduce with with either maint or blead.


It seems to have been fixed between 5.8.0 and 5.8.1:


    $ cat x
    #!/usr/bin/perl

    use strict;
    use warnings;
    no warnings 'syntax';

    use Data::Dumper;                          

    open my($O), ">", "/tmp/out";          
    print $O Data::Dumper->Dump([], []);    
    print "OK\n";

    __END__
    $ /opt/perl/5.8.0/bin/perl -wc x
    Bareword found where operator expected at x line 17, near "$O Data::Dumper"
            (Missing operator before Data::Dumper?)
    x syntax OK
    $ /opt/perl/5.8.1/bin/perl -wc x
    x syntax OK


Abigail

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About