Re: Basic question on arrays $ vs @

2011-05-31 Thread Chris Nehren
On Wed, May 25, 2011 at 13:15:49 -0400 , Tim Lewis wrote: > This is a very basic question on arrays and referring to the elements. In > referring to the elements, I know that it is correct practice to use $ > instead of @, but I know that Perl allows the @. My simple question is what > is the dif

RE: Basic question on arrays $ vs @

2011-05-25 Thread Tim Lewis
Thanks Uri. That makes perfect sense. -Original Message- From: Uri Guttman [mailto:u...@stemsystems.com] Sent: Wednesday, May 25, 2011 1:37 PM To: Tim Lewis Cc: beginners@perl.org Subject: Re: Basic question on arrays $ vs @ >>>>> "TL" == Tim Lewis writes:

Re: Basic question on arrays $ vs @

2011-05-25 Thread Uri Guttman
> "TL" == Tim Lewis writes: TL> This is a very basic question on arrays and referring to the TL> elements. In referring to the elements, I know that it is correct TL> practice to use $ instead of @, but I know that Perl allows the @. TL> My simple question is what is the difference.

Re: Basic question

2004-04-04 Thread WC -Sx- Jones
WC -Sx- Jones wrote: Kumar, Praveen (cahoot) wrote: Hi, yes i could solve my problem, but can you let me know what is the difference in using '{' '[' Thank You very much.. {$0} = hash [0] = array Sorry. { indicates a hash [ indicates an array -Sx- Also, maybe I missed it in the th

Re: Basic question

2004-04-03 Thread R. Joseph Newton
"Kumar, Praveen (cahoot)" wrote: > Hello, Hi Praveen.K [Is that what your friends call you in conversation?] > >I am completely new to perl, and i am trying to write a small > script, which based on the input given displays the value in an array. But > when i try to execute the scri

Re: Basic question

2004-04-02 Thread WC -Sx- Jones
Kumar, Praveen (cahoot) wrote: Hi, yes i could solve my problem, but can you let me know what is the difference in using '{' '[' Thank You very much.. {$0} = hash [0] = array Sorry. { indicates a hash [ indicates an array -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

RE: Basic question

2004-04-02 Thread Kumar, Praveen (cahoot)
c: '[EMAIL PROTECTED]' Subject: Re: Basic question Kumar, Praveen (cahoot) wrote: > print "You are $list{$0}\n"; print "You are " . $list[0] . "\n"; Why - {$0} = hash [0] = array -Sx- .sophos.3.79.04.04. * Internet communicatio

Re: Basic question

2004-04-02 Thread WC -Sx- Jones
Kumar, Praveen (cahoot) wrote: print "You are $list{$0}\n"; print "You are " . $list[0] . "\n"; Why - {$0} = hash [0] = array -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Basic question...

2003-09-25 Thread R. Joseph Newton
"NIPP, SCOTT V (SBCSI)" wrote: > I posted the other day a question about writing a daemon to monitor > a directory and then process the files as they arrive in said directory. I > will begin working on this shortly, but I have a related question and this I > think is mainly a question of

RE: Basic question...

2003-09-25 Thread Hanson, Rob
> I see two ways of writing this code. Hmmm, how about a third way. The following code dynamically loads a module based on the extension of the file. If it successfully loads the module it instantiates a new object and calls the handle_file() method of the object. This accomplishes a few things

RE: basic question: handling input to TCP/IP server

2003-06-25 Thread McMahon, Christopher x66156
ile ($client = $server->accept()) { my $n = sysread($client,$input,1000); print "$input\n" ; } -Original Message- From: Gupta, Sharad [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 7:11 PM To: Gupta, Sharad; McMahon, Christopher x66156; [EMAIL P

RE: basic question: handling input to TCP/IP server

2003-06-24 Thread Gupta, Sharad
quot;. -Sharad -Original Message- From: Gupta, Sharad Sent: Monday, June 23, 2003 3:36 PM To: 'McMahon, Christopher x66156'; [EMAIL PROTECTED] Subject: RE: basic question: handling input to TCP/IP server Something like this worked for me in the past: use strict; use IO::S

RE: basic question: handling input to TCP/IP server

2003-06-24 Thread McMahon, Christopher x66156
more lines of code and I'll be impersonating the New York Stock Exchange! -Chris -Original Message- From: Gupta, Sharad [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 4:41 PM To: McMahon, Christopher x66156; [EMAIL PROTECTED] Subject: RE: basic question: handling in

RE: basic question: handling input to TCP/IP server

2003-06-23 Thread Gupta, Sharad
Something like this worked for me in the past: use strict; use IO::Socket::INET; my $sock = IO::Socket::INET(); while(1) { my $output; my $n = sysread($sock,$output,1000); last if(!defined($n)); print STDOUT $output; } And using syswrite() for writing. perldo

Re: Basic Question on %ENV

2001-11-27 Thread Jenda Krynicky
From: Andrea Holstein <[EMAIL PROTECTED]> > [EMAIL PROTECTED] wrote: > > > > Here is a basic question on %ENV hash. I gave a pronto statement as thus: > > > > perl -e "print $ENV{ComputerName};" > > > > and it printed the correct information. > > > > On my MS-DOS prompt when I gave the SET com

Re: Basic Question on %ENV

2001-11-26 Thread Andrea Holstein
[EMAIL PROTECTED] wrote: > > Here is a basic question on %ENV hash. I gave a pronto statement as thus: > > perl -e "print $ENV{ComputerName};" > > and it printed the correct information. > > On my MS-DOS prompt when I gave the SET command, I noticed that the > environmental variable for Comput

Re: Basic Question

2001-09-29 Thread Randal L. Schwartz
> "Geoff" == Geoff <[EMAIL PROTECTED]> writes: Geoff> I have a very basic question. At webmonkey.com I found a CGI Tutorial, and Geoff> am trying to implement CGI on my own site. I tried using the script on my Geoff> website, but it doesn't seem to work. I've worked with Perl for about 4