Re: Ternary operator

2009-09-10 Thread Uri Guttman
> "SB" == Steve Bertrand writes: SB> Besides consistently forgetting how to properly spell "ternary", I SB> can't, for some reason, embed it's use into my brain no matter how SB> much I read. ternary op is an official name but it has many nicknames so they are worth knowing too. condit

Ternary operator

2009-09-10 Thread Steve Bertrand
[ forgive me if it was sent twice. My first should be bounced as bad sender addr ]. Besides consistently forgetting how to properly spell "ternary", I can't, for some reason, embed it's use into my brain no matter how much I read. Perhaps if someone could show me the way against a personal code s

Re: "$| = 1" ???

2009-09-10 Thread Chas. Owens
On Thu, Sep 10, 2009 at 20:55, Raymond Wan wrote: snip > Perldoc is somewhat hard to get into...but it's the manual for a programming >  language, so that's expected; I don't think having pages to color and draw > on would be a feasible idea for the next update.  :-) snip Oh, I don't know, perlco

Re: "$| = 1" ???

2009-09-10 Thread Raymond Wan
Shawn H Corey wrote: Uri Guttman wrote: newbies will never learn it unless coerced into doing so. I disagree. If they don't have the curiosity to read all they can, then perhaps a future in computer programming is not an ideal career path for them. That's somewhat of a harsh statement..

Re: command line perldoc and Padre, the Perl IDE

2009-09-10 Thread Chas. Owens
On Thu, Sep 10, 2009 at 13:54, Gabor Szabo wrote: snip > There is the new  perlopref  document by Chas. Owens who is also on > this list. That's great. Thanks Chas!  That will be able to explain > certain expressions such as &&. > > I am sure he will be happy to get some help from you. > See http:

Re: Perl projects for beginners

2009-09-10 Thread Octavian Râsnita
From: "Gabor Szabo" To: "Octavian Râsnita" Cc: Sent: Thursday, September 10, 2009 8:59 PM Subject: Re: Perl projects for beginners On Thu, Sep 10, 2009 at 8:08 PM, Octavian Râsnita wrote: From: "Gabor Szabo" Could you please tell us what does PDK give you? PDK doesn't extract the file

Re: Perl projects for beginners

2009-09-10 Thread Gabor Szabo
On Thu, Sep 10, 2009 at 8:08 PM, Octavian Râsnita wrote: > From: "Gabor Szabo" >> >> Could you please tell us what does PDK give you? > > PDK doesn't extract the files with the perl source code and for most cases > this protection is enough. > It creates smaller files than PAR and it gives less e

command line perldoc and Padre, the Perl IDE

2009-09-10 Thread Gabor Szabo
perldoc has all sorts of problems, it is hard to use to people who don't yet know how to use it and it does not give you a useful answer to many questions. It gives you a correct answer, it is just not very useful to beginners. tryperldoc -f open It has a long explanation on all kinds of cas

Re: "$| = 1" ???

2009-09-10 Thread Uri Guttman
> "SHC" == Shawn H Corey writes: SHC> Uri Guttman wrote: >> newbies will never learn it unless coerced into >> doing so. SHC> I disagree. If they don't have the curiosity to read all they can, SHC> then perhaps a future in computer programming is not an ideal career SHC> path fo

Re: "$| = 1" ???

2009-09-10 Thread Shawn H Corey
Uri Guttman wrote: newbies will never learn it unless coerced into doing so. I disagree. If they don't have the curiosity to read all they can, then perhaps a future in computer programming is not an ideal career path for them. Some problems facing newbies: * They may not know perldoc eve

Re: "$| = 1" ???

2009-09-10 Thread Chas. Owens
On Thu, Sep 10, 2009 at 13:12, Bryan R Harris wrote: snip > My point is that-that's not obvious.  Why would anyone perldoc perl?  Isn't > perldoc already about perl?  Granted, just typing perldoc gets you started, > but it's at least 3 steps before you start getting close to your answer > (1-perld

Re: Perl projects for beginners

2009-09-10 Thread Octavian Râsnita
From: "Gabor Szabo" Could you please tell us what does PDK give you? PDK doesn't extract the files with the perl source code and for most cases this protection is enough. It creates smaller files than PAR and it gives less errors. Octavian -- To unsubscribe, e-mail: beginners-unsubscr...@

Re: "$| = 1" ???

2009-09-10 Thread Bryan R Harris
>> "BRH" == Bryan R Harris writes: > > BRH> Curiously the most helpful people on this list seem to think the > BRH> perldoc system is great, but I've always found it to be rather > BRH> hard to use. If I need to figure out what "$." means, how do I > BRH> even start? I can't type

Re: Help Please

2009-09-10 Thread John W. Krahn
Jyoti wrote: Can someone explain me what these symbols mean in regular expression: my $trim = sub {local($_)=shift; $$_ =~ s/^\s*//; ^ means that you want to anchor the pattern at the beginning of the string in $$_. \s is a character class that matches the whitespace characters " ", "\

Re: "$| = 1" ???

2009-09-10 Thread Uri Guttman
> "BRH" == Bryan R Harris writes: BRH> Curiously the most helpful people on this list seem to think the BRH> perldoc system is great, but I've always found it to be rather BRH> hard to use. If I need to figure out what "$." means, how do I BRH> even start? I can't type "perldoc '$.'

Re: "$| = 1" ???

2009-09-10 Thread Gabor Szabo
On Thu, Sep 10, 2009 at 5:26 PM, Bryan R Harris wrote: > >>> "ES" == Erez Schatz writes: >> $| is a special variable. All perl special variables are listed in perldoc perlvar. See that document for a full explanation. >> >>   ES> This isn't really helping, sorry. >> >> sorry, but po

Re: "$| = 1" ???

2009-09-10 Thread Chas. Owens
On Thu, Sep 10, 2009 at 10:26, Bryan R Harris wrote: > >>> "ES" == Erez Schatz writes: >> $| is a special variable. All perl special variables are listed in perldoc perlvar. See that document for a full explanation. >> >>   ES> This isn't really helping, sorry. >> >> sorry, but poin

Re: "$| = 1" ???

2009-09-10 Thread Shawn H Corey
Bryan R Harris wrote: Curiously the most helpful people on this list seem to think the perldoc system is great, but I've always found it to be rather hard to use. Compared to most language documentation, perldoc is great; it's just not perfect. My pet peeve is the `perldoc -q` only searches

Re: "$| = 1" ???

2009-09-10 Thread Bryan R Harris
>> "ES" == Erez Schatz writes: > >>> $| is a special variable. All perl special variables are listed in >>> perldoc perlvar. See that document for a full explanation. > > ES> This isn't really helping, sorry. > > sorry, but pointing someone to the docs is helping more than directly > ans

Re: Help Please

2009-09-10 Thread Peter Scott
On Thu, 10 Sep 2009 14:01:36 +, Peter Scott wrote: > Unless it's written by someone whose Perl learning stopped with Perl 4. Scratch that, I was so focussed on the body of the subroutine I forgot the context. > sub trim { $_[0] =~ s/^\s*(.*?)\s*$/$1/ } my $trim = sub { $_[0] =~ s/^\s*(.*?)\

Re: Help Please

2009-09-10 Thread Shawn H Corey
Peter Scott wrote: Unless it's written by someone whose Perl learning stopped with Perl 4. Or someone with a C background and has yet to learn all the nuances or Perl. :) -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it

Re: Help Please

2009-09-10 Thread Peter Scott
On Thu, 10 Sep 2009 17:43:47 +0530, Ajay Kumar wrote: > And > $$_ you can understand like below > > > $name="ajay"; > $class="name" > > $$class== ajay It is unlikely that the original code was called with symbolic references like you have just explained. More likely it was called with real r

Re: Help Please

2009-09-10 Thread Jyoti
Thanks All... Going through documentation as well as short explanation was useful.. I got it [?] Cheers!!! <<330.png>>

Re: Help Please

2009-09-10 Thread Philip Potter
2009/9/10 Ajay Kumar : > And > $$_ you can understand like below > > > $name="ajay"; > $class="name" > > $$class== ajay Don't use symbolic references. This will not compile under "use strict;" or "use strict 'refs';". If you need references, use hard references: $name = "ajay"; $class = \$name; #

RE: Help Please

2009-09-10 Thread Ajay Kumar
hi it is ananymous subroutine Here $_ means value of the argument that passed to the sunroutine And $$_ you can understand like below $name="ajay"; $class="name" $$class== ajay Thanks Ajay -Original Message- From: Shawn H Corey [mailto:shawnhco...@gmail.com] Sent: Thursday, Septem

Re: Help Please

2009-09-10 Thread Shawn H Corey
Jyoti wrote: Can someone explain me what these symbols mean in regular expression: my $trim = sub {local($_)=shift; $$_ =~ s/^\s*//; $$_ =~ s/\s*$//;}; Thanks. Yes, it's all explained in: http://perldoc.perl.org/5.8.8/perlretut.html http://perldoc.perl.org/5.8.8/perlre.html -- Ju

Re: Perl projects for beginners

2009-09-10 Thread Gabor Szabo
On Tue, Sep 8, 2009 at 1:05 PM, Octavian Râsnita wrote: > I use ActivePerl and not > Strawberry. I've tried Strawberry Perl but I found very many modules I > couldn't install with it, the PPM under that distro of Perl has less > features than ActiveState's one, I also need ActiveState PDK that a

Help Please

2009-09-10 Thread Jyoti
Can someone explain me what these symbols mean in regular expression: my $trim = sub {local($_)=shift; $$_ =~ s/^\s*//; $$_ =~ s/\s*$//;}; Thanks.

Re: "$| = 1" ???

2009-09-10 Thread Philip Potter
2009/9/10 Erez Schatz : > 2009/9/10 Philip Potter : >> 2009/9/10 Tariq Doukkali : >>> Hi, >>> >>> i can not understand, what does this code: >>> >>> >>> $| = 1; > > This means the programmer wishes that the buffer will be flushed after > every write, or print. > Normally (i.e. $| = 0), the computer

AW: Regular expression help

2009-09-10 Thread Tariq Doukkali
Hi, try with this code: #!/usr/bin/perl -w my $test = 'a,c,d,f,r,t,"f(3),g(4)",d,f,f,f,"f(3),t(8)",d,t'; $test =~ s/\"([a-z][\(0-9\)]*),([a-z][\(0-9\)]*)\"/$1|$2/g; print $test . "\n"; Tariq -Ursprüngliche Nachricht- Von: Dave Tang [mailto:d.t...@imb.uq.edu.au] Gesendet: Mittwoch, 26

Re: "$| = 1" ???

2009-09-10 Thread Uri Guttman
> "ES" == Erez Schatz writes: >> $| is a special variable. All perl special variables are listed in >> perldoc perlvar. See that document for a full explanation. ES> This isn't really helping, sorry. sorry, but pointing someone to the docs is helping more than directly answering the q

Re: "$| = 1" ???

2009-09-10 Thread Erez Schatz
2009/9/10 Philip Potter : > 2009/9/10 Tariq Doukkali : >> Hi, >> >> i can not understand, what does this code: >> >> >> $| = 1; This means the programmer wishes that the buffer will be flushed after every write, or print. Normally (i.e. $| = 0), the computer stores output in a buffer, which is pro

Re: "$| = 1" ???

2009-09-10 Thread Shlomi Fish
On Thursday 10 September 2009 11:17:33 Tariq Doukkali wrote: > Hi, > > i can not understand, what does this code: > > > $| = 1; > $| is a special variable. Reading its description from perldoc perlvar: < $| If set to nonzero, forces a flush right away and after every

Re: "$| = 1" ???

2009-09-10 Thread Uri Guttman
> "TD" == Tariq Doukkali writes: TD> Hi, TD> i can not understand, what does this code: TD> $| = 1; all of perl's special variables are documented in perldoc perlvar. read that first and see if you learn what $| does. if you still don't get it, then ask here for clarification. uri

Re: "$| = 1" ???

2009-09-10 Thread Philip Potter
2009/9/10 Tariq Doukkali : > Hi, > > i can not understand, what does this code: > > > $| = 1; $| is a special variable. All perl special variables are listed in perldoc perlvar. See that document for a full explanation. Phil -- "I have always wished for my computer to be as easy to use as my te

"$| = 1" ???

2009-09-10 Thread Tariq Doukkali
Hi, i can not understand, what does this code: $| = 1; Thanks