Mobile::Wurfl vs Apache2::WURFL Filter

2010-04-24 Thread Mimi Cafe
Hi, Has anyone experience using one of these modules? Unlike Mobile::Wurfl, I seems to me that Apache2::WURFL Filter will take all the work once configured? It that accurate or am I missing something in the short documentation I have read? Mimi

Re: special variable $? usage

2010-04-24 Thread John W. Krahn
Shawn H Corey wrote: Brandon McCaig wrote: my $cmdline = "echo 'DIS CHS(*)' | runmqsc SQFR | grep CHANNEL | sort | uniq -c"; # Open input pipe from command line. open(my $pipe, "-|", $cmdline); open my $pipe, '-|', $cmdline or die "could not open pipe: $!\n"; for my $line (<$pipe>) whil

Re: Strong Type comparsion in Perl

2010-04-24 Thread Bob goolsby
And, whist you're at it, take a good look at your "use case". I have yet to see a use of the PHP triple-equal that wasn't a band-aid to recover from a design error in the code. B On Thu, Apr 22, 2010 at 8:55 AM, Ryan Chan wrote: > How to do strong type comparsion in Perl, like in PHP > > e.g. >

Re: Need help to resove..... ExtUtils-Makemaker comilationS

2010-04-24 Thread Shlomi Fish
Hi Raheel, Sorry for the late response. On Friday 23 Apr 2010 19:04:20 Raheel Hassan wrote: > Hi Shlomi and Owen, > > On Thu, Apr 22, 2010 at 5:37 PM, Shlomi Fish wrote: > >2.6.27.24-2 is the kernel version (which is kinda old - I'm using > > 2.6.33.2). I > > >need the Mandriva version - plea

File::Find and top level directory

2010-04-24 Thread Harry Putnam
When using File::Find; Is there any built in way to know when you are in the top level of one of the directories in @directories? I mean besides grepping $File::Find::dir. I know that give the current directory name and of course the top directory could be massages out with something like: m

Re: special variable $? usage

2010-04-24 Thread Shawn H Corey
Brandon McCaig wrote: On Thu, Apr 22, 2010 at 1:05 PM, John W. Krahn wrote: What does that sentence mean? What would the number returned from the shell (bash, csh, ksh, etc.) have to do with the numbers output from "runmqsc SQFR"? Perhaps he really wants to read and parse the output from the

Re: about dispatch tables

2010-04-24 Thread Harry Putnam
Shawn H Corey writes: > Harry Putnam wrote: >> Harry Putnam writes: >> >>> However, using your suggestion: >>> > $code->($var1, $var2); >> >> Something I forgot to ask about that. >> >> What if more than 1 of referenced sub routines needed vars passed in >> but the needed vars were not the sam

Re: special variable $? usage

2010-04-24 Thread Brandon McCaig
On Thu, Apr 22, 2010 at 1:05 PM, John W. Krahn wrote: > What does that sentence mean?  What would the number returned from the shell > (bash, csh, ksh, etc.) have to do with the numbers output from "runmqsc > SQFR"? Perhaps he really wants to read and parse the output from the command(s) instead

Re: about dispatch tables

2010-04-24 Thread Harry Putnam
Ireneusz Pluta writes: > Harry Putnam wrote: >> I don't see the expected result when I press `y'. > you never print it errr... yup, (corrective action taken). -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.

Re: about dispatch tables

2010-04-24 Thread Ireneusz Pluta
Harry Putnam wrote: I don't see the expected result when I press `y'. you never print it (The code is at the end) It seems to do nothing. ... non working code: #!/usr/local/bin/perl use strict; use warnings; my $var1 = 'whoopdee'; my $var2 = 'do'; my %dispatch = ( y => \&yy,

Re: about dispatch tables

2010-04-24 Thread Peter Scott
On Sat, 24 Apr 2010 10:06:37 -0500, Harry Putnam wrote: > Harry Putnam writes: > > >> However, using your suggestion: >> > $code->($var1, $var2); > > Something I forgot to ask about that. > > What if more than 1 of referenced sub routines needed vars passed in but > the needed vars were not

Re: about dispatch tables

2010-04-24 Thread Shawn H Corey
Harry Putnam wrote: Harry Putnam writes: However, using your suggestion: > $code->($var1, $var2); Something I forgot to ask about that. What if more than 1 of referenced sub routines needed vars passed in but the needed vars were not the same? I'm guessing that using $code->() is not suc

Re: about dispatch tables

2010-04-24 Thread Harry Putnam
Harry Putnam writes: > > However, using your suggestion: > > $code->($var1, $var2); Something I forgot to ask about that. What if more than 1 of referenced sub routines needed vars passed in but the needed vars were not the same? I'm guessing that using $code->() is not such a good idea. Wh

Re: about dispatch tables

2010-04-24 Thread Shawn H Corey
Harry Putnam wrote: Ireneusz Pluta writes: Harry Putnam wrote: #!/usr/local/bin/perl use strict; use warnings; my $var1 = 'whoopdee'; my $var2 = 'do'; my %dispatch = ( y => \&yy($var1,$var2), this, actually, is not a code reference but a return value reference of the &yy($var1,

Re: about dispatch tables

2010-04-24 Thread Harry Putnam
Ireneusz Pluta writes: > Harry Putnam wrote: >> #!/usr/local/bin/perl >> >> use strict; >> use warnings; >> >> my $var1 = 'whoopdee'; >> my $var2 = 'do'; >> >> my %dispatch = ( >> y => \&yy($var1,$var2), > this, actually, is not a code reference but a return value reference > of the &yy(

Re: Newbie stuck at the first hurdle

2010-04-24 Thread Kryten
Thank you Thomas. The problem was indeed the use of a double quoted string which was wrecking my file path. Using the $! var helped me to see that. "Learning Perl" and "Programming Perl" both arrived today, thank goodness! Cheers, Stuart -- To unsubscribe, e-mail: beginners-unsubscr...@perl.o

Re: Newbie stuck at the first hurdle

2010-04-24 Thread Kryten
Hi Uri, Thanks for the response. I was using both Komodo Edit and Primalscript and didn't see a compile error, until I added the ref to $! then I could see that my filepath was being damaged because of the doublequotes. The reason I wondered about the full path was because I have been using Powe

Re: Strong Type comparsion in Perl

2010-04-24 Thread Uri Guttman
> "RC" == Ryan Chan writes: RC> How to do strong type comparsion in Perl, like in PHP RC> e.g. define type. RC> // same type and same value RC> if ($foo === $bar) { RC> } perl uses == or eq to compare numerically or string wise. it is better to put the control in the op vs the d

Re: about dispatch tables

2010-04-24 Thread Ireneusz Pluta
Harry Putnam wrote: #!/usr/local/bin/perl use strict; use warnings; my $var1 = 'whoopdee'; my $var2 = 'do'; my %dispatch = ( y => \&yy($var1,$var2), this, actually, is not a code reference but a return value reference of the &yy($var1, $var2) subroutine call, executed right at the tim

Strong Type comparsion in Perl

2010-04-24 Thread Ryan Chan
How to do strong type comparsion in Perl, like in PHP e.g. // same type and same value if ($foo === $bar) { } -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/