use strict

2001-06-25 Thread Silvio Luis Leite Santana
Hi all Please I'd like to know how can a program like the 'camel program' be compiled and run, because there are spaces spliting keywords! It seems it's because of the 'use strict', but I don't see any relation between them. The camel book, doesn't tell anything about spaces inside keywords eit

Re: use strict

2001-06-25 Thread Silvio Luis Leite Santana
'japhy' Pinyan wrote: > > On Jun 25, Silvio Luis Leite Santana said: > > >I'd like to know how can a program like > >the 'camel program' be compiled and run, > >because there are spaces spliting keywords! > > The secret is on line 2. >

curly braces

2001-06-26 Thread Silvio Luis Leite Santana
Please Why does code 1 work, but code 2 doesn't? (the diference is the ; after print) After all, is it posible or not to put a block in place of a expression? Thanks in advance Silvio CODE 1 - WORK $bissexto = ; chop($bissexto); $bissexto and { print "OK\n" }; print "end\n"; CODE 2 - DOESN'T

open +>>

2001-06-27 Thread Silvio Luis Leite Santana
Hi all The camel-book and perldoc-page says about "open": You may also place a + in front of any of these three modes to request simultaneous read and write. +< is for read/write updates +> clobber the file, reread only what you wrote What would +>> do? the same as +< ? the camel-book

backticks

2001-07-02 Thread Silvio Luis Leite Santana
Hi all I've just did that, and it worked: [silvio@tico perl]$ cat saida cat: saida: No such file or directory [silvio@tico perl]$ perl -e '$x = `pwd>saida`; print "[$x]\n";' [] [silvio@tico perl]$ cat saida /home/silvio/perl It seems the backtick operator calls the shell, otherwise it wouldn't b

to double or to single quotes? that's the question

2001-07-12 Thread Silvio Luis Leite Santana
Hi all Just to confirm some thoughts I had... Since double quotes need to be searched for variable interpolation, while single quotes don't, I should always (whenever possible) prefer single quotes instead of double quotes in my programs, because: print 'hi all'; would be faster than print "h

autoflush on network connection

2001-07-19 Thread Silvio Luis Leite Santana
Hello all Trying to learn a bit of networking, I am using the module IO::Socket::INET just as shown in the camel book (3rd edition) pg 439-441. I have a client process (that sends data), and a server (that receives those data). I send data from the client to server with the lines: $mensagem =

typeglobs and references

2001-07-24 Thread Silvio Luis Leite Santana
Hi I have been reading the camel book; it's really fantastic (and funny), but I still didn't understand some topics. One thing that's not so clear is about constants made with typeglobs and references; that's in page 295 of 3rd Ed. I have made the following program to test them: #!/usr/bin/perl -

Re: typeglobs and references

2001-07-25 Thread Silvio Luis Leite Santana
Thank you very much for your help about Perl. There's just something I didn't get yet. When I write *PI = 5; What am I really doing? I think I was assigning (not attribing :) ) the value 5 to the scalar slot of the glob PI, since 5 is scalar, but when asking for a print "$PI"; all we see is a

Re: Fun With Perl list ???? where is it ? :)

2001-08-02 Thread Silvio Luis Leite Santana
OK, officially too :) 2.3 - Are there any rules? Yes. As with most communities, there are rules. Not many, and ones that shouldn't need to be mentioned, but they are. Be nice No flaming Have fun Silvio Luis Leite Santana wrote: > > Hi all > Is there actua

Fun With Perl list ???? where is it ? :)

2001-08-03 Thread Silvio Luis Leite Santana
Hi all Is there actually a Fun With Perl list? (ok, this list is funny already, but not officially :) ) I think I learn better when I'm having fun (that's why I think so easy to learn Perl reading the camel book, and learning everything else by the o'reilly books) If there isn't a list, perhaps