[Bug 1150693] Perl quick concatenate doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1150693

Ralf Corsepius <rc040203@xxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |CLOSED
         Resolution|---                         |NOTABUG
        Last Closed|                            |2014-10-08 23:00:56



--- Comment #1 from Ralf Corsepius <rc040203@xxxxxxxxxx> ---
Your example isn't valid perl.

# cat example1
#!/usr/bin/perl -w
my $foo = "Foo";
my $bar = "Bar";
my $foo .= $bar;
print $foo;

# ./example1
"my" variable $foo masks earlier declaration in same scope at ./foo line 4.


Removing the second my $foo lets your example work as expected:

# cat example2
#!/usr/bin/perl -w
my $foo = "Foo";
my $bar = "Bar";
$foo .= $bar;
print $foo;

# ./example2
FooBar

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=wH1v7C1Ul4&a=cc_unsubscribe
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux