I'm trying to figure out what was meant by perl not having variables.

It could be that Perl is not very fussy about variable declarations like some
other languages.

Or perhaps he's referring to the somewhat crude way that variables are passed
from subroutines. All the values go into an array list.

Steve

At 11:23 PM 5/8/01 -0700, you wrote:
>No variables in perl?!?!?!?  I use at least 3 kinds of variables on a regular
>basis:
>Scalar: 
>$a + $b = $c
>Array:
>$a[0] + $a[1] = $a[2]
>Hash:
>$a{a} + $a{b} = $a{c}
>Maybe I don't understand what your're saying?  I only use shift/unshift/pop/
>push/splice on variables that I made arrays, and as far as I know, calling
>one of these functions on a scalar or hash results in an error. 
>Granted, perl is a bit ugly...  A full rebuild from scratch is underway
>last I heard, but don't hold your breath, it IS a large task.  
>One other thing to note - perl is standard on almost every Unix-like
>OS.  Python is not, at least not yet.  I would venture to say that mod_perl
>is in wider use than mod_python, if you're looking for web usage.  
>Does the concept of "tainted data" exist in python?  Haven't looked into
>it thoroughly yet.  Are there any built in security features in python?
>The interactive interpreter in python is kewl though.  It would be nice
>to have a kind of "perlsh" ... maybe for perl 6 ...
>
><[EMAIL PROTECTED]>
>
>On Tue, May 08, 2001 at 06:52:26PM -0700, Rob Hudson wrote:
>> I would tend not to use Perl for anything too large as it's function
>> setup is strange.  I don't like how there are no variables, as you
>> mention, everything is passed in some sort of an array, and you have
>> to 'shift' off what you need.
>> 
>> -Rob
>> 
>> PS: What's the 'K' in K<bob>?
>> 
>> > On 20010508.1523, Bob Miller said ...
>> >
>> > On Tue, May 08, 2001 at 01:57:25PM -0700, Cory Petkovsek wrote:
>> > 
>> > > I think this has already been mentioned before, but I'm finding the
>> > > need to learn a scripting language.  Something more powerful than
>> > > bash, but not as indepth(?) as C.
>> > > 
>> > > I currently know C, C++ and Java.  Can anyone tell me in about a
>> > > paragraph why I should learn perl or python or
>> > > $your_favorite_scripting_language?  I don't need to be sold hard, I
>> > > just want a few highlights of each language, especially how it is
>> > > related to bash and C or C++ (not java ;(
>> > 
>> > I know Perl pretty thoroughly.  I have written a few dozen lines of
>> > Python.  If I needed to learn a scripting language today, I would pick
>> > Python, but I have too much invested in Perl to make the switch.
>> > 
>> > Perl is very powerful and very ugly.  Its power comes from having nearly
>> > all of libc built in, and from the Comprehensive Perl Archive Network
>> > (CPAN), a truly huge library.  I always start a nontrivial Perl project
>> > by searching CPAN for keywords.  Perl also has strong regular expression
>> > support fairly well integrated into the language.  Not all problems
>> > need regexps in their solution, but when they do, you can't beat Perl.
>> > 
>> > Perl is also ugly.  Its semantics are just weird because perl 3 and
>> > perl 4 had no datastructures except lists (one-dimensional vectors)
>> > and hashes, and it only had dynamic scoping.  References (pointers),
>> > objects, and lexical scoping were added in perl 5, and Perl suffers
>> > from its legacy.  Perl also uses lots of punctuation, and the
>> > punctuation makes programs hard to read.
>> > 
>> > Python does not yet have anything equivalent to CPAN, but it's
>> > a much cleaner design, since it was object oriented and lexically
>> > scoped from the beginning.
>> > 
>> >                                    K<bob>
>> > 
>> 
>

Reply via email to