On 08/25/2007 07:39 PM, Gunnar Hjalmarsson wrote:
Mumia W. wrote:
On 08/25/2007 04:32 PM, Gunnar Hjalmarsson wrote:
Jeff Pang wrote:
2007/8/25, Praveena Vittal [EMAIL PROTECTED]:
I want to redirect to a different url with the parameters in the post
method.
Well,see 'perldoc CGI' and
On Aug 26, 2007, at 3:22 AM, Randal L. Schwartz wrote:
Perl is a very strongly typed language. The problem is that people
keep
thinking number or string is a type in Perl. It isn't. The
type is
called scalar. Other types are array and hash and
filehandle and
dirhandle and built-in
On Aug 24, 9:11 am, [EMAIL PROTECTED] (Randal L. Schwartz) wrote:
Justin == Justin The Cynical [EMAIL PROTECTED] writes:
Justin The Llama presents hashes as single value to a key, so I never thought
Justin to make a hash of arrays.
That's because (a) an arrayref is still a single value, so
On Sat, 25 Aug 2007 18:22:13 -0700, (Randal L. Schwartz) wrote:
Jeff == Jeff Pang [EMAIL PROTECTED] writes:
Jeff Perl isn't a strong type language like C,so you don't have the need to
Jeff convert the variable type distinctly.
Perl is a very strongly typed language. The problem is that
On Sun, 26 Aug 2007 01:00:31 +, Justin The Cynical wrote:
On Aug 24, 9:11 am, [EMAIL PROTECTED] (Randal L. Schwartz) wrote:
That's because (a) an arrayref is still a single value, so we haven't really
lied, so much as just simplified to what can be handled in the first 30 hours
with Perl,
On Aug 26, 2007, at 3:52 PM, Peter Scott wrote:
The term strong typing is so ill-defined as to make this an
angels-dancing-on-a-pinhead discussion and unlikely to lead to any
enlightenment. Even the Wikipedia definition says that there *is* no
accepted definition and some of the common usages
Peter Scott wrote:
Don't use the term symlink, however tempting, or you'll confuse
yourself and others about real symlinks. Yes, it's not an array in the
hash; it's a scalar containing a *reference* to an array, and there may or
may not be other references to that array elsewhere in the program
On Sun, 26 Aug 2007 12:17:49 -0400, Mr. Shawn H. Corey wrote:
Peter Scott wrote:
Don't use the term symlink, however tempting, or you'll confuse
yourself and others about real symlinks. Yes, it's not an array in the
hash; it's a scalar containing a *reference* to an array, and there may or
Dr.Ruud wrote:
Why do people who write these books have exercises of little
practical value?
An exercise needs to be educational.
I have worked in programming for 25 years and during that time I have never use
a closure and have never seen one used. I may be harsh in my definitions but
Mr == Mr Shawn H Corey [EMAIL PROTECTED] writes:
Mr Objects can do the same things as closures, which is store and hide data,
Mr but don't have this problem of having to keep in mind two phases of the
Mr same code.
But objects have fixed code with variable data. Closures can have variable
code
Randal L. Schwartz wrote:
Think of closures as variables that hold behavior. Sure, maybe you've never
needed that in your legendary 25 years in the industry, but I've used it
*frequently* in my 30 years. :)
Why do you include an insult with every thing you post?
BTW, what legends do you
Shawn == Shawn H Corey [EMAIL PROTECTED] writes:
Shawn Why do you include an insult with every thing you post?
I don't think I do. I was only making fun of your claim, since you made the
claim. Why did you include 25 years? It just sets you up for a fall. :)
Shawn BTW, what legends do you
Randal L. Schwartz wrote:
Shawn == Shawn H Corey [EMAIL PROTECTED] writes:
Shawn Why do you include an insult with every thing you post?
I don't think I do. I was only making fun of your claim, since you made the
claim. Why did you include 25 years? It just sets you up for a fall. :)
Oh,
Shawn == Mr Shawn H Corey [EMAIL PROTECTED] writes:
Shawn Oh, I get it. When I said 25 years, you thought that I meant 25 years
Shawn with Perl.
No.
Shawn Sorry, about the confusion.
No confusion.
Shawn I have programmed in many different languages and have never seen a
Shawn closure.
The code didnt work. Error:
Can't stat /my/dir: No such file or directory
at test.pl line 12
On 8/20/07, Martin Barth [EMAIL PROTECTED] wrote:
On Fri, 17 Aug 2007 07:48:33 -0700
[EMAIL PROTECTED] (Randal L. Schwartz) wrote:
Why not just:
my @list;
find sub { push @list,
Mr. Shawn H. Corey wrote:
Dr.Ruud wrote:
Why do people who write these books have exercises of little
practical value?
An exercise needs to be educational.
I have worked in programming for 25 years and during that time I have
never use a closure and have never seen one used. I may be
Somu == Somu [EMAIL PROTECTED] writes:
Somu The code didnt work. Error:
Somu Can't stat /my/dir: No such file or directory
Somu at test.pl line 12
Then you don't have /my/dir. :)
I'd actually be surprised if you did. I haven't seen any systems that have
/my as a top-level directory.
--
Mumia W. wrote:
Mumia W. wrote:
On 08/25/2007 04:32 PM, Gunnar Hjalmarsson wrote:
Jeff Pang wrote:
2007/8/25, Praveena Vittal [EMAIL PROTECTED]:
I want to redirect to a different url with the parameters in the
post
method.
Well,see 'perldoc CGI' and specially check for,
param,
redirect.
In article [EMAIL PROTECTED], Mr. Shawn H. Corey
[EMAIL PROTECTED] wrote:
Chris wrote:
I'm working on yet another exercise from Intermediate Perl. I've been
given a script that searches for files that fall between a two
timestamps.
Why do people who write these books have exercises of
In article [EMAIL PROTECTED], Robert
Hicks [EMAIL PROTECTED] wrote:
When it asks about threads should I enable them or no?
In Perl's Configure, if you don't understand the question, accept the
default answer. :)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
On 8/26/07, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote:
Mumia W. wrote:
snip
Btw, is this technique properly documented anywhere, or would it be a
suitable addition to perlfaq9?
Its not a Perl technique. Its part of the HTTP specs.
PS Why do my emails show up on the www.codecomments.com
On 8/26/07, Mr. Shawn H. Corey [EMAIL PROTECTED] wrote:
Dr.Ruud wrote:
Why do people who write these books have exercises of little
practical value?
An exercise needs to be educational.
I have worked in programming for 25 years and during that time I have never
use a
closure and have
I run a perl command below,
perl -Mstrict -Mwarnings -e 'eval {my $x=3;my $y=$x-3;$x/$y};print hello'
Useless use of division (/) in void context at -e line 1.
hello
I'm confused about the first warning.What's it?thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
On 8/26/07, lists user [EMAIL PROTECTED] wrote:
I run a perl command below,
perl -Mstrict -Mwarnings -e 'eval {my $x=3;my $y=$x-3;$x/$y};print hello'
Useless use of division (/) in void context at -e line 1.
hello
I'm confused about the first warning.What's it?thanks.
Let's break this down
yitzle wrote:
On 8/26/07, Gunnar Hjalmarsson [EMAIL PROTECTED] wrote:
Btw, is this technique properly documented anywhere, or would it be a
suitable addition to perlfaq9?
Its not a Perl technique. Its part of the HTTP specs.
quote
NAME
perlfaq9 - Networking ($Revision: 1.15 $, $Date:
Hi,
I want to implement longest prefix match in my code in perl, but am not able
to get started with it. I am sure, it can be easily achieved with the help
of regex in perl, but I haven't worked on it. Following is what I want to
do:-
If the phone number is
+852 --- The country is Hong Kong
On 8/27/07, Mihir Kamdar [EMAIL PROTECTED] wrote:
Hi,
I want to implement longest prefix match in my code in perl, but am not able
to get started with it. I am sure, it can be easily achieved with the help
of regex in perl, but I haven't worked on it. Following is what I want to
do:-
If
first build a hash which record all countries and their codes.
my %countries = (852 = 'Hong Kong', 853 = 'Macau' ...);
then use regex or other ways (I prefer substr) to get the prefix.
my $prefix = substr($string,1,3);
last get the country name via the prefix code.
my $country =
Mihir Kamdar wrote:
I want to implement longest prefix match in my code in perl, but am not able
to get started with it. I am sure, it can be easily achieved with the help
of regex in perl, but I haven't worked on it.
perldoc perlrequick
perldoc perlretut
perldoc perlre
Good luck!
29 matches
Mail list logo