ManifestShadow has asked for the wisdom of the Perl Monks concerning the following question:
The man pages were good in telling me that use strict; was the "safest" way to run code but didn't explain why I was getting "Global symbol "$name" requires explicit package name." Thanks -Pete#!/usr/bin/perl -w use strict; print "Hello, I am Komodo what is your name? "; $name = <STDIN>; chomp $name; print "Hello, $name!\n";
20050112 Edit by castaway: Changed title from 'Total Noob....'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Explanation of 'use strict;'
by friedo (Prior) on Jan 11, 2005 at 21:25 UTC | |
|
Re: Explanation of 'use strict;'
by kutsu (Priest) on Jan 11, 2005 at 21:28 UTC | |
|
Re: Explanation of 'use strict;'
by radiantmatrix (Parson) on Jan 11, 2005 at 21:45 UTC | |
|
what does 'global variable requires package name' mean (was: Re: Total Noob....)
by Joost (Canon) on Jan 11, 2005 at 22:13 UTC | |
by Cody Pendant (Prior) on Jan 12, 2005 at 01:37 UTC | |
by Joost (Canon) on Jan 12, 2005 at 01:45 UTC | |
|
Re: Explanation of 'use strict;'
by Anonymous Monk on Jan 12, 2005 at 11:00 UTC | |
|
Re: Explanation of 'use strict;'
by Tanktalus (Canon) on Jan 11, 2005 at 21:25 UTC | |
|
Re: Explanation of 'use strict;'
by Eimi Metamorphoumai (Deacon) on Jan 11, 2005 at 21:25 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |