------------------------------------------------ On Thu, 3 Apr 2003 14:05:19 -0500, [EMAIL PROTECTED] wrote:
> > All, > > I added the "use strict;" statement to my script for the first time and > received the following compilation errors: > Global symbol "$LoginName" requires explicit package name at todaysFiles.pl > line 43. > Global symbol "$TMPNow" requires explicit package name at todaysFiles.pl > line 45. > Global symbol "@filenames" requires explicit package name at todaysFiles.pl > line 48. > Global symbol "$filenames" requires explicit package name at todaysFiles.pl > line 49. > > This program works fine without the "use strict" statement?.please advise!! > You have some obligatory reading to do :-)... You should read: http://perl.plover.com/FAQs/Namespaces.html perldoc strict perldoc -f my perldoc -f our Essentially you need to declare the namespace/scope of the variables you are using. Before they were automagically placed in the 'main::' namespace. This seems overly tedious at first, once you learn the practice you will forever appreciate it. > Also, can someone offer an explanation of how "=" differs from "= ="?? > '=' is for assignment, '==' is for comparison... so you 'assign' a variable with the first: my $variable = 'value'; you compare number values with the second: if ($variable == 4) { } http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]