> <[EMAIL PROTECTED]> wrote:
>>
>> well im trying at lerning this perl stuff.. reading from the
>> "learning
>> perl" oreilly book and a few other places,
>> but also using perl a long time before i should ie making the below
>> script, so that i dont get in to any very bad habbits at such an ear
<[EMAIL PROTECTED]> wrote:
>
> well im trying at lerning this perl stuff.. reading from the "learning
> perl" oreilly book and a few other places,
> but also using perl a long time before i should ie making the below script,
> so that i dont get in to any very bad habbits at such an early stage.
>
<[EMAIL PROTECTED]> wrote:
>
> well im trying at lerning this perl stuff.. reading from the "learning
> perl" oreilly book and a few other places,
> but also using perl a long time before i should ie making the below script,
> so that i dont get in to any very bad habbits at such an early stage.
>
[EMAIL PROTECTED] wrote:
> Hi all
> well im trying at lerning this perl stuff.. reading from the "learning
> perl" oreilly book and a few other places,
> but also using perl a long time before i should ie making the below script,
> so that i dont get in to any very bad habbits at such an early st
Howdy,
Always use strict;
Then your variables won't get messy, see the perldoc strict for more details.
> foreach $site (@dataFile) { # loop for each line/site in dataFile
> chomp $site;
You might make your life easier to by not declaring a variable at all here:
for(@datafile) {
> Global symbol "$site" requires explicit package name at ./makeArf.pl line 17.
One of the things about strict is it makes you declare the scope of your
variables before using them. So, for instance, while:
#! /usr/bin/perl
$foo = "foo\n";
print $foo;
Would run, the following wouldn't:
#! /usr
> On Thu, 06 Nov 2003 16:33:41 +, drowl wrote:
>> #!/usr/bin/perl -w
>
> No big deal, but - IMO - easier to read, and it adds strict;
>
> #!/usr/bin/perl
> #
> use strict;
> use warnings;
>
>> @dataFile=<>; # read in file from command line
>> @standardRules=`cat standard.for.arf.txt` ;
On Thursday, Nov 6, 2003, at 09:56 US/Pacific, [EMAIL PROTECTED] wrote:
i now get the below warning along with many others...
how does one declair a varible then?
Global symbol "$site" requires explicit package name at ./makeArf.pl
line 17.
I think your hit is at:
foreach $site (@dataFile) {
t;);
> setSpeedOut("$siteACRate");
> setDeviceSpeedIn("$siteACRate");
> setDeviceSpeedOut("$siteACRate");
> }
> EOF
>
> It makes it a lot easier to read, not to mention I could remove the \n
> and the \" escapes. BTW - If you h
On Thu, 06 Nov 2003 16:33:41 +, drowl wrote:
> #!/usr/bin/perl -w
No big deal, but - IMO - easier to read, and it adds strict;
#!/usr/bin/perl
#
use strict;
use warnings;
> @dataFile=<>; # read in file from command line
> @standardRules=`cat standard.for.arf.txt` ;
my @dataFile
nt standard bits
This is pretty icky:
>print ARFfile ("name matches \".*RH-Serial.*\":
> {\n \tsetName(\"$SiteName-RH-WAN\$2\") ;\n \tsetGroup
> (\"$siteGroup\") "); # print RH-Serial rule
Try a here-document instead:
# print RH-Serial rule
Hi all
well im trying at lerning this perl stuff.. reading from the "learning
perl" oreilly book and a few other places,
but also using perl a long time before i should ie making the below script,
so that i dont get in to any very bad habbits at such an early stage.
could some one please have a
12 matches
Mail list logo