[30762] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2007 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 26 14:09:50 2008

Date: Wed, 26 Nov 2008 11:09:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 26 Nov 2008     Volume: 11 Number: 2007

Today's topics:
    Re: comp.lang.* newsgroups seems dying <xahlee@gmail.com>
    Re: comp.lang.* newsgroups seems dying <tzz@lifelogs.com>
    Re: Efficient Code <michaelgang@gmail.com>
    Re: Efficient Code <tzz@lifelogs.com>
    Re: Efficient Code <hirenshah.05@gmail.com>
    Re: Efficient Code <tadmc@seesig.invalid>
    Re: Efficient Code <tzz@lifelogs.com>
    Re: my variable is recognized in following sub <sbryce@scottbryce.com>
    Re: my variable is recognized in following sub <michaelgang@gmail.com>
    Re: my variable is recognized in following sub <tadmc@seesig.invalid>
    Re: my variable is recognized in following sub <sbryce@scottbryce.com>
    Re: my variable is recognized in following sub sln@netherlands.com
    Re: my variable is recognized in following sub <jurgenex@hotmail.com>
    Re: my variable is recognized in following sub xhoster@gmail.com
    Re: my variable is recognized in following sub xhoster@gmail.com
    Re: my variable is recognized in following sub <uri@stemsystems.com>
    Re: my variable is recognized in following sub <tadmc@seesig.invalid>
    Re: Mysql -> Perl - MS-Excel ? <rvtol+news@isolution.nl>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 26 Nov 2008 06:24:31 -0800 (PST)
From: Xah Lee <xahlee@gmail.com>
Subject: Re: comp.lang.* newsgroups seems dying
Message-Id: <03e11af2-9586-47cf-b483-6c23dc100973@k1g2000prb.googlegroups.com>

Xah Lee wrote:
> > it's funny that in comp.lang.perl.misc, half of the post these days
> > are Perl FAQs. lol. The Perl community's fanatical fuckhead priests
> > are practical and loud bunch, thinking they are mavericks and messiahs
> > among the programing geekers. They post their FAQ frequently, but not
> > only that, they cut it into 1 Question/Answer format and post several
> > of it per day. They've been doing that for years.

On Nov 26, 5:44 am, brian d  foy <brian.d....@gmail.com> wrote:
> Actually, there's only one fuckhead posting the FAQ, and that's me. :)
>
> It's once every four hours (so only six a day). They always come from
> the same posting address so they are easy to filter, and I use my real
> email address as the sender so people know who's doing it and how to
> contact me. Posting these excerpts to comp.lang.perl.misc is the only
> reason the FAQ is as healthy as it is. The readers send me patches for
> errors, updates, and so on.
>
> It might seem like half the *messages* are PerlFAQ, but it's more like
> half of the new *threads*.  Depending on your newreader, that can be
> confusing I guess.
>
> It's really just me, the maintainer of the Perl FAQ. No other fuckheads
> have anything to do with it, so don't credit or blame them.

thanks for the info.

btw, it's not a complain. I'm just illustrating a aspect of maverick
practice among perlers.

btw, is =E2=80=9Ccomp.lang.perl.*=E2=80=9D officially defunct? Someone told=
 that now
the activity is at =E2=80=9Cperl.*=E2=80=9D.

  Xah
=E2=88=91 http://xahlee.org/

=E2=98=84



------------------------------

Date: Wed, 26 Nov 2008 10:19:10 -0600
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: comp.lang.* newsgroups seems dying
Message-Id: <86bpw2ihoh.fsf@lifelogs.com>

On Wed, 26 Nov 2008 06:24:31 -0800 (PST) Xah Lee <xahlee@gmail.com> wrote: 

XL> btw, is “comp.lang.perl.*” officially defunct? Someone told that now
XL> the activity is at “perl.*”.

Yes, it's dead, the posts you see are just recycled from 1996-1997 and
rewritten by a special AI program.  

Ted


------------------------------

Date: Wed, 26 Nov 2008 06:23:38 -0800 (PST)
From: david <michaelgang@gmail.com>
Subject: Re: Efficient Code
Message-Id: <5770df52-7d71-43de-9404-f542aa7d2446@v15g2000yqn.googlegroups.com>

try hashes of the format
17.64.0.0|17 =3D>Table A
I assume that each number can belong just to Table A or Table B.

If the file gets too large for the memory then use maybe a database
solution (sqlite) or tie::hash to a file


On Nov 26, 4:03=A0pm, "friend...@gmail.com" <hirenshah...@gmail.com>
wrote:
> I have large file in following format.
>
> Table A {
> =A0 =A0 =A0 =A0 17.64.0.0|17;
> =A0 =A0 =A0 =A0 32.58.34.192|26;
> =A0 =A0 =A0 =A0 32.58.157.0|24;
> =A0 =A0 =A0 =A0 32.106.15.0|24;
> =A0 =A0 =A0 =A0 }
>
> Table B {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 32.106.80.0|21;
> =A0 =A0 =A0 =A0 32.106.88.0|24;
> =A0 =A0 =A0 =A0 32.106.192.0|20;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
>
> I want to read the file and store it in some data structure and then I
> will go through the data structure and according to some codition I
> will value I need and then I should also able to find it belongs which
> table (Table A or Table B).
>
> Which will efficient data structure to store this type data and then
> also retrive it fast to see in which table it exist.
>
> Right now I am using two dimensional array. But since it is very slow.



------------------------------

Date: Wed, 26 Nov 2008 10:16:29 -0600
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Efficient Code
Message-Id: <86iqqaihsy.fsf@lifelogs.com>

On Wed, 26 Nov 2008 06:03:16 -0800 (PST) "friend.05@gmail.com" <hirenshah.05@gmail.com> wrote: 

f> I have large file in following format.
f> Table A {
f>	17.64.0.0|17;
f>	32.58.34.192|26;
f>	32.58.157.0|24;
f>	32.106.15.0|24;
f>	}

f> Table B {
f>		   32.106.80.0|21;
f>	32.106.88.0|24;
f>	32.106.192.0|20;
f>		   }


f> I want to read the file and store it in some data structure and then I
f> will go through the data structure and according to some codition I
f> will value I need and then I should also able to find it belongs which
f> table (Table A or Table B).

f> Which will efficient data structure to store this type data and then
f> also retrive it fast to see in which table it exist.

f> Right now I am using two dimensional array. But since it is very slow.

These are IPv4 net blocks.  Storing net blocks efficiently is easy,
since they are just binary strings with a mask number between 0 and 32,
which is 5 bytes.  You can then use vec() or pack()/unpack() to extract
the data or match against it.  Of course, you could just use
Net::Netmask if your "condition" involves searches through net block
tables as it did the last time you asked about net blocks.

Ted


------------------------------

Date: Wed, 26 Nov 2008 10:07:28 -0800 (PST)
From: "friend.05@gmail.com" <hirenshah.05@gmail.com>
Subject: Re: Efficient Code
Message-Id: <e66e528c-bd0f-44b9-806b-b6eca7152793@d42g2000prb.googlegroups.com>

On Nov 26, 11:16=A0am, Ted Zlatanov <t...@lifelogs.com> wrote:
> On Wed, 26 Nov 2008 06:03:16 -0800 (PST) "friend...@gmail.com" <hirenshah=
 ...@gmail.com> wrote:
>
> f> I have large file in following format.
> f> Table A {
> f> =A0 17.64.0.0|17;
> f> =A0 32.58.34.192|26;
> f> =A0 32.58.157.0|24;
> f> =A0 32.106.15.0|24;
> f> =A0 }
>
> f> Table B {
> f> =A0 =A0 =A0 =A0 =A0 =A0 =A032.106.80.0|21;
> f> =A0 32.106.88.0|24;
> f> =A0 32.106.192.0|20;
> f> =A0 =A0 =A0 =A0 =A0 =A0 =A0}
>
> f> I want to read the file and store it in some data structure and then I
> f> will go through the data structure and according to some codition I
> f> will value I need and then I should also able to find it belongs which
> f> table (Table A or Table B).
>
> f> Which will efficient data structure to store this type data and then
> f> also retrive it fast to see in which table it exist.
>
> f> Right now I am using two dimensional array. But since it is very slow.
>
> These are IPv4 net blocks. =A0Storing net blocks efficiently is easy,
> since they are just binary strings with a mask number between 0 and 32,
> which is 5 bytes. =A0You can then use vec() or pack()/unpack() to extract
> the data or match against it. =A0Of course, you could just use
> Net::Netmask if your "condition" involves searches through net block
> tables as it did the last time you asked about net blocks.
>
> Ted

doubt not related to perl.

have large file in following format.

REGION Table_A {
        17.64.0.0|17;
        32.58.34.192|26;
        32.58.157.0|24;
        32.106.15.0|24;
        52.106.32.0|21;
        22.32.88.0|24;



}


I want only IP address starting with 32.

so for above list it should return 3 address:
32.58.34.192|26;
32.58.157.0|24;
32.106.15.0|24;


what expression should I use in grep




------------------------------

Date: Wed, 26 Nov 2008 11:15:58 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: Efficient Code
Message-Id: <slrngir12e.evv.tadmc@tadmc30.sbcglobal.net>

friend.05@gmail.com <hirenshah.05@gmail.com> wrote:

> have large file in following format.
>
> REGION Table_A {
>         17.64.0.0|17;
>         32.58.34.192|26;
>         32.58.157.0|24;
>         32.106.15.0|24;
>         52.106.32.0|21;
>         22.32.88.0|24;
>
>
>
> }
>
>
> I want only IP address starting with 32.
>
> so for above list it should return 3 address:
> 32.58.34.192|26;
> 32.58.157.0|24;
> 32.106.15.0|24;
>
>
> what expression should I use in grep


    my @thirty_twos = grep /^\s*32\./, <FILE>;


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


------------------------------

Date: Wed, 26 Nov 2008 12:54:40 -0600
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Efficient Code
Message-Id: <86iqqagvwv.fsf@lifelogs.com>

On Wed, 26 Nov 2008 10:07:28 -0800 (PST) "friend.05@gmail.com" <hirenshah.05@gmail.com> wrote: 

f0c> On Nov 26, 11:16am, Ted Zlatanov <t...@lifelogs.com> wrote:
>> These are IPv4 net blocks. Storing net blocks efficiently is easy,
>> since they are just binary strings with a mask number between 0 and 32,
>> which is 5 bytes. You can then use vec() or pack()/unpack() to extract
>> the data or match against it. Of course, you could just use
>> Net::Netmask if your "condition" involves searches through net block
>> tables as it did the last time you asked about net blocks.

f> doubt not related to perl.

f> have large file in following format.

f> REGION Table_A {
f>	   17.64.0.0|17;
f>	   32.58.34.192|26;
f>	   32.58.157.0|24;
f>	   32.106.15.0|24;
f>	   52.106.32.0|21;
f>	   22.32.88.0|24;
f> }

f> I want only IP address starting with 32.

f> so for above list it should return 3 address:
f> 32.58.34.192|26;
f> 32.58.157.0|24;
f> 32.106.15.0|24;

f> what expression should I use in grep

/bin/grep '[^0-9.]32\.' FILE

But is that really what you are looking for, or are you trying to match
two net blocks to each other?  Your requirements have changed three
times now and as much as I'd like to help you, you have to actually tell
us what you're trying to do instead of asking for specific bits of
information you can easily find in the documentation.

Ted


------------------------------

Date: Wed, 26 Nov 2008 07:10:27 -0700
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: my variable is recognized in following sub
Message-Id: <ggjldd$imc$1@news.motzarella.org>

david wrote:
> Hi all,
> 
> I wanted to share my findings about my variables and following sub.
> 
> The following program works:
> 
> use strict;
> use warnings;
> 
> my $a = 30;
> foo();
> 
> sub foo {
> 	print $a,"\n",
> }
> 
> It prints 30 as output.

As it should.

> At the first glance it was suprising for me
> how the  $a variable is recognized by the sub.

Why? You declared $a as a global variable.

> They are really in the
> same scope. If this is intended by the user (closures) this is
> wonderful but it can cause bugs.

Which is why you should declare variables in the smallest possible scope.

> The only solution is to write the function at the beginning.

Or don't declare variables in a broader scope than necessary.


------------------------------

Date: Wed, 26 Nov 2008 06:19:44 -0800 (PST)
From: david <michaelgang@gmail.com>
Subject: Re: my variable is recognized in following sub
Message-Id: <b4948313-8220-4521-a7c2-15799bb4ab40@j35g2000yqh.googlegroups.com>

On Nov 26, 4:10=A0pm, Scott Bryce <sbr...@scottbryce.com> wrote:
> david wrote:
> > Hi all,
>
> > I wanted to share my findings about my variables and following sub.
>
> > The following program works:
>
> > use strict;
> > use warnings;
>
> > my $a =3D 30;
> > foo();
>
> > sub foo {
> > =A0 =A0print $a,"\n",
> > }
>
> > It prints 30 as output.
>
> As it should.
>
> > At the first glance it was suprising for me
> > how the =A0$a variable is recognized by the sub.
>
> Why? You declared $a as a global variable.
>
> > They are really in the
> > same scope. If this is intended by the user (closures) this is
> > wonderful but it can cause bugs.
>
> Which is why you should declare variables in the smallest possible scope.

why is $a a global variable? if i write my $a it does not make it to a
local variable?
>
> > The only solution is to write the function at the beginning.
>
> Or don't declare variables in a broader scope than necessary.



------------------------------

Date: Wed, 26 Nov 2008 07:38:47 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: my variable is recognized in following sub
Message-Id: <slrngiqkb7.d17.tadmc@tadmc30.sbcglobal.net>

david <michaelgang@gmail.com> wrote:
> On Nov 26, 4:10pm, Scott Bryce <sbr...@scottbryce.com> wrote:
>> david wrote:
>> > Hi all,
>>
>> > I wanted to share my findings about my variables and following sub.
>>
>> > The following program works:
>>
>> > use strict;
>> > use warnings;
>>
>> > my $a = 30;
>> > foo();
>>
>> > sub foo {
>> >  print $a,"\n",
>> > }
>>
>> > It prints 30 as output.
>>
>> As it should.
>>
>> > At the first glance it was suprising for me
>> > how the $a variable is recognized by the sub.
>>
>> Why? You declared $a as a global variable.
>>
>> > They are really in the
>> > same scope. If this is intended by the user (closures) this is
>> > wonderful but it can cause bugs.
>>
>> Which is why you should declare variables in the smallest possible scope.
>
> why is $a a global variable? 


Because you made it so.

You declared it at file scope, so it is visible throughout the file.


See:

   "Coping with Scoping":

      http://perl.plover.com/FAQs/Namespaces.html


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


------------------------------

Date: Wed, 26 Nov 2008 08:46:44 -0700
From: Scott Bryce <sbryce@scottbryce.com>
Subject: Re: my variable is recognized in following sub
Message-Id: <ggjr1s$cas$1@news.motzarella.org>

david wrote:
<example code snipped>

> why is $a a global variable? if i write my $a it does not make it to 
> a local variable?

Since $a was declared outside of any block, its scope is from the place
it was declared to the end of the script. That includes the foo subroutine.

There is a sense in which $a is local, but it is local to the entire
script, starting from the place where it was declared.

http://perl.plover.com/FAQs/Namespaces.html


------------------------------

Date: Wed, 26 Nov 2008 16:01:53 GMT
From: sln@netherlands.com
Subject: Re: my variable is recognized in following sub
Message-Id: <ckrqi45p672ke096h5idipvqvncsu8iu23@4ax.com>

On Wed, 26 Nov 2008 05:22:25 -0800 (PST), david <michaelgang@gmail.com> wrote:

>Hi all,
>
>I wanted to share my findings about my variables and following sub.
>
>The following program works:
>
>use strict;
>use warnings;
>
>my $a = 30;
>foo();
>
>sub foo {
>	print $a,"\n",
>}
>
>It prints 30 as output. At the first glance it was suprising for me
>how the  $a variable is recognized by the sub. They are really in the
>same scope.

Your program has its own namespace. I think its brought into the Main:: namespace.
The above works because it is really this:

{
	use strict;
	use warnings;
	my $A = 30;
	print $A,"\n";
}

> If this is intended by the user (closures) this is
>wonderful but it can cause bugs.
>The only solution is to write the function at the beginning.
>
>use strict;
>use warnings;
>
>sub foo {
>	print $a,"\n",
>}
>
>my $a = 30;
>foo();
>
>This won't compile
>

The above doesen't work because its really this:

{
	use strict;
	use warnings;
	print $A,"\n";
	my $A = 30;
}
__END__
Global symbol "$A" requires explicit package name at jjj.pl line 4.



------------------------------

Date: Wed, 26 Nov 2008 08:08:26 -0800
From: Jrgen Exner <jurgenex@hotmail.com>
Subject: Re: my variable is recognized in following sub
Message-Id: <ebrqi4l7ukf5pg0rm5n7nvl7jhc8t84r2k@4ax.com>

david <michaelgang@gmail.com> wrote:
>I wanted to share my findings about my variables and following sub.
>
>The following program works:
>
>use strict;
>use warnings;
>
>my $a = 30;
>foo();
>
>sub foo {
>	print $a,"\n",
>}
>
>It prints 30 as output. At the first glance it was suprising for me
>how the  $a variable is recognized by the sub. 

Why wouldn't it be recognized? It's a normal global variable.

>They are really in the same scope. 

The function definition and the variable are (not that this would matter
much), but not the _body_ of the function and the global variable. The
body may define local objects, too, which will be visible in addition to
any global objects.. This is the typical semantic for the vast majority
of programming languages, nothing special about it..

>If this is intended by the user (closures) this is

It is not a closure! Quite the opposite, actually. 

>wonderful but it can cause bugs.

Yes, of course. That is why global variables are discouraged and should
be used only when there is a good reason for using them. Again, that
applies to the vast majority of programming languages.

>The only solution is to write the function at the beginning.

No!!! 
First of all it doesn't work because in Perl with strictures enabled you
need to declare a variable before using it ($a is an exception, see
below). 
And second it is standard best practice in any programming language to
avoid global variables unless you have a very good reason why you need
them.

>use strict;
>use warnings;
>
>sub foo {
>	print $a,"\n",
>}
>
>my $a = 30;
>foo();
>
>This won't compile

It does compile and it even runs. All you get is a warning (if warnings
are enabled as they should be)
	Use of uninitialized value in print at [...]

However using $a in Perl is not a good idea to begin with. $a and $b are
special in sort() and therefore excempt from several checks in
warnings/strict. 
Had you used a different variable e.g. $x, then you would have gotten
the error 
	Global symbol "$x" requires explicit package name at [...]
	Execution of [...] aborted due to compilation errors.
from strict, which is telling you that you are using a variable before
it is declared. This is much more to the point and more important the
reason why your "solution" doesn't work.

>Hope this will save from other programmers to get unexpected errors.

Hmmm, well, except your 'solution' doesn't address the underlying
problem, violates proven best practices, and doesn't work.

jue


------------------------------

Date: 26 Nov 2008 16:55:03 GMT
From: xhoster@gmail.com
Subject: Re: my variable is recognized in following sub
Message-Id: <20081126115412.307$Pm@newsreader.com>

Scott Bryce <sbryce@scottbryce.com> wrote:
> david wrote:
> > Hi all,
> >
> > I wanted to share my findings about my variables and following sub.
> >
> > The following program works:
> >
> > use strict;
> > use warnings;
> >
> > my $a = 30;
> > foo();
> >
> > sub foo {
> >       print $a,"\n",
> > }
> >
> > It prints 30 as output.
>
> As it should.
>
> > At the first glance it was suprising for me
> > how the  $a variable is recognized by the sub.
>
> Why? You declared $a as a global variable.

Aren't global variables the same thing as package variables?
And aren't those mutually exclusive with lexical variables?

The scope of the lexical variable may be broad, but that doesn't
make it global, at least not in Perl vernacular as I understand it.


Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


------------------------------

Date: 26 Nov 2008 17:05:02 GMT
From: xhoster@gmail.com
Subject: Re: my variable is recognized in following sub
Message-Id: <20081126120411.148$NX@newsreader.com>

"John W. Krahn" <jwkrahn@shaw.ca> wrote:
> david wrote:
> >
> > I wanted to share my findings about my variables and following sub.
> >
> > The following program works:
> >
> > use strict;
> > use warnings;
> >
> > my $a = 30;
> > foo();
> >
> > sub foo {
> >       print $a,"\n",
> > }
> >
> > It prints 30 as output. At the first glance it was suprising for me
> > how the  $a variable is recognized by the sub. They are really in the
> > same scope. If this is intended by the user (closures) this is
> > wonderful but it can cause bugs.
>
> That is not a closure.
>
> perldoc -q closure

Actually, I think it is a closure.  It is a nasty accidental closure with
possibly undesirable consequences, for example it only closes once, at
compile time (The ability to re-close may be desirable, but by my
understanding it is not a mandatory part of the definition of a closure.
Obviously this gets into semantics, but sometimes semantics are important).

Understandably, the part of the docs that describes closures described the
*right* way to do them, not that nasty accidental way.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


------------------------------

Date: Wed, 26 Nov 2008 12:36:18 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: my variable is recognized in following sub
Message-Id: <x7hc5ue6el.fsf@stemsystems.com>

>>>>> "x" == xhoster  <xhoster@gmail.com> writes:

  >> Why? You declared $a as a global variable.

  x> Aren't global variables the same thing as package variables?
  x> And aren't those mutually exclusive with lexical variables?

  x> The scope of the lexical variable may be broad, but that doesn't
  x> make it global, at least not in Perl vernacular as I understand it.

i have been watching this thread with bemusement and seeing the group
miscommunicate about this topic. let me try to clear up the mess. :)

if you declare a lexical (my) variable in the body of a perl source file
outside of any sub or block, it is best called a file scoped lexical. it
is visible from the point (or just after :) of the declaration to the
end of the file. you can even declare another my variable of the same
name and it will now be scoped to the end of the file (but it will
generate a warning so don't do it). these types of variable are also
called file globals as they are usually global to the entire file (even
though the declararation is lexical.

what most perl uses of global mean are what is more properly called
package globals. this means they are in the symbol table and truly
global to the entire program (as long as you know where to find it in
the symbol table, you can mung it at a distance).

so we have the lexically declared file scoped 'globals' and
program/package 'globals'. please note the difference now and when you
discuss these in the future. i won't even bring up 'our' which just adds
to the confusion by being a lexical declaration of a package global!

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Wed, 26 Nov 2008 11:12:50 -0600
From: Tad J McClellan <tadmc@seesig.invalid>
Subject: Re: my variable is recognized in following sub
Message-Id: <slrngir0si.evv.tadmc@tadmc30.sbcglobal.net>

sln@netherlands.com <sln@netherlands.com> wrote:


>>my $a = 30;


> Your program has its own namespace. 


and it is named main::


> I think its brought into the Main:: namespace.


You are incorrect. Twice.

If it was a package variable, then it would be in the main:: package.

But it is a lexical variable, and lexical variables are not in any package.


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


------------------------------

Date: Wed, 26 Nov 2008 19:54:26 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Mysql -> Perl - MS-Excel ?
Message-Id: <ggk9np.1hg.1@news.isolution.nl>

me schreef:

> Unfortunately this client wants a pure Excel file - no csv import...
> so I'm stuck with a specific MS-Excel output. I agree, csv is the
> better way to go.

If you don't need any special formatting,
and you output dates as "yyyy-mm-dd HH:MM:SS" strings,
then just save the resulting CSV (with proper headers) under an xls-name
like data.xls,
and most users won't even notice that the file isn't a native Excel
file.

-- 
Affijn, Ruud

"Gewoon is een tijger."



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 2007
***************************************


home help back first fref pref prev next nref lref last post