[28784] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 28 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 14 18:05:55 2007

Date: Sun, 14 Jan 2007 15:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 14 Jan 2007     Volume: 11 Number: 28

Today's topics:
    Re: Ascii characters in a loop <uri@stemsystems.com>
    Re: Ascii characters in a loop <uri@stemsystems.com>
    Re: Ascii characters in a loop <john@castleamber.com>
    Re: Ascii characters in a loop <hjp-usenet2@hjp.at>
    Re: Ascii characters in a loop (Alan Curry)
    Re: Ascii characters in a loop (Mark Hobley)
    Re: Ascii characters in a loop (Mark Hobley)
    Re: Ascii characters in a loop <uri@stemsystems.com>
    Re: Ascii characters in a loop <uri@stemsystems.com>
    Re: Ascii characters in a loop <rvtol+news@isolution.nl>
    Re: Ascii characters in a loop (Mark Hobley)
    Re: Ascii characters in a loop <tadmc@augustmail.com>
        Asynchronous alert <sun_tong_001@users.sourceforge.net>
    Re: Asynchronous alert (NOSPAM)
    Re: Asynchronous alert <sun_tong_001@users.sourceforge.net>
        backtick and system command mail4ashok@gmail.com
    Re: backtick and system command xhoster@gmail.com
    Re: backtick and system command mail4ashok@gmail.com
        cgi problem with "gt" and "lt" <nick@maproom.co.uk>
    Re: cgi problem with "gt" and "lt" <mritty@gmail.com>
    Re: Graph in Perl <anil.jupiter9@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 14 Jan 2007 11:42:59 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Ascii characters in a loop
Message-Id: <x78xg5tv8s.fsf@mail.sysarch.com>

>>>>> "MH" == Mark Hobley <markhobley@hotpop.deletethisbit.com> writes:


  MH> I am documenting Perl and at the moment I am documenting loops, so
  MH> I need to know any place where choosing a particular value will
  MH> cause different behaviour than choosing another value.

what is this 'documenting perl'? perl IS documented and very well at
that. and there are tons of books about perl. what do you expect to
bring to the table and make it worthy of reading?

  MH> I often use alphabetical increments in code, so anywhere that choosing a 
  MH> particular values for alphabetical ranges requires a change in syntax to 
  MH> perform across those range needs to be noted. 

there is no need to worry about this if you understand the rules of
magic incrementing strings. they are well documented under ++ and .. in
perlop. and in general it makes little sense to code them using c style
for loops. (in fact c style for loops are RARELY needed in perl). use
 .. for looping over a range of incrementing strings.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


------------------------------

Date: Sun, 14 Jan 2007 11:45:06 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Ascii characters in a loop
Message-Id: <x74pqttv59.fsf@mail.sysarch.com>

>>>>> "MH" == Mark Hobley <markhobley@hotpop.deletethisbit.com> writes:

  MH> John Bokma <john@castleamber.com> wrote:
  >> for ($l = 'a'; $l ne 'aa'; $l++) {
  >> print "$l";
  >> }

  MH> Yeah! I just think that 'a to z' looks far nicer late on a Friday
  MH> night when I am trying to debug code.

  MH> I need to test reverse loops, capitals, jumping by more than one
  MH> letter at a time now to see if there are any more nasty surprises.

what is a reverse loop? perl has no such beast. perldoc perlop covers
magic increment, have you read it? 

  MH> I often loop through alphabetical sequences in code.

then you must be the odd one. i rarely do and i rarely see it. it is
useful and i use it but often??

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


------------------------------

Date: 14 Jan 2007 17:48:58 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Ascii characters in a loop
Message-Id: <Xns98B878321B85Bcastleamber@130.133.1.4>

markhobley@hotpop.deletethisbit.com (Mark Hobley) wrote:

> This looks like a bug to me, at least in the context of an a to z
> loop. 

I am sure most will call it a feature, that 'z'++ goes to 'aa'. 

As for loops, the form you use is in my experience very rare. I would have 
used:

for my $l ( 'a' .. 'z' ) {

}

Less cluter, and much easier to understand.

-- 
John                Experienced Perl programmer: http://castleamber.com/

          Perl help, tutorials, and examples: http://johnbokma.com/perl/


------------------------------

Date: Sun, 14 Jan 2007 20:03:51 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Ascii characters in a loop
Message-Id: <slrneqkvkn.ii0.hjp-usenet2@yoyo.hjp.at>

On 2007-01-14 10:04, Mark Hobley <markhobley@hotpop.deletethisbit.com> wrote:
> John Bokma <john@castleamber.com> wrote:
>> My guess: because he wants to know why this one "doesn't work" instead of 
>> reading: "use this instead".
>
> I am writing Perl documentation. All these points seem to be missed in the 
> reference books that I am using, which incidently are extremely big and run
> into several thousand pages each and cost me quite a few quid.
>
> It seems strange that if I increment $l (which equals 'z') then I now have a 
> value that is comparitively less than 'z'.

That's because the "le" operator doesn't define "less" and "greater" in
the same sense as "++" increments. The same happens if you use numbers:

for (my $l = 0; $l le 9; $l++) {
  print "$l ";
}   

prints

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 

Because 90 is the first number which is greater than 9 in a string
comparison.

Only with numbers there is a simple solution (use "<=" instead of "le"),
while there is no builtin comparison operator for "alphanumeric
numbers".

	hp


-- 
   _  | Peter J. Holzer    | > Wieso sollte man etwas erfinden was nicht
|_|_) | Sysadmin WSR       | > ist?
| |   | hjp@hjp.at         | Was sonst wäre der Sinn des Erfindens?
__/   | http://www.hjp.at/ |	-- P. Einstein u. V. Gringmuth in desd


------------------------------

Date: Sun, 14 Jan 2007 19:17:30 +0000 (UTC)
From: pacman@TheWorld.com (Alan Curry)
Subject: Re: Ascii characters in a loop
Message-Id: <eodvka$n7h$1@pcls6.std.com>

In article <7p8p74-5ul.ln1@neptune.markhobley.yi.org>,
Mark Hobley <markhobley@hotpop.deletethisbit.com> wrote:
>
>It seems strange that if I increment $l (which equals 'z') then I now have a 
>value that is comparitively less than 'z'.

Since you are writing a C-style for loop when a simpler for(foo..bar) would
have been better, I'll assume you're a C programmer. Consider this C code:

unsigned i;
for(i=0;i<=4294967295;++i)
  dosomethingwith(i);

Does it seem strange that this is an infinite loop (at least where int is 32
bits or less)? You incremented a variable past the end of a range, and you
didn't check the documentation to find out what would happen. In C, what
happens is a wrap around to 0, which is sometimes useful, but if it's not
what you want you need to check for it.

In perl, ++($x='z') could have been defined to wrap around to 'a', or could
have been defined to be chr(ord('z')+1), or could have been defined to yield
a duplicate 'z', or to die() with some informative error message. But for the
purposes for which magical string autoincrement was intended, 'aa' is more
likely to be useful, so that's the way it's defined.

-- 
Alan Curry
pacman@world.std.com


------------------------------

Date: Sun, 14 Jan 2007 20:04:15 GMT
From: markhobley@hotpop.deletethisbit.com (Mark Hobley)
Subject: Re: Ascii characters in a loop
Message-Id: <ttcq74-gjn.ln1@neptune.markhobley.yi.org>

Uri Guttman <uri@stemsystems.com> wrote:

> what is a reverse loop?

I meant a decremental loop that goes from a higher value to a lower one.

 perl has no such beast. perldoc perlop covers
> magic increment, have you read it? 

I have now, but I don't think it is really that clear.
 
>  MH> I often loop through alphabetical sequences in code.
> then you must be the odd one. i rarely do and i rarely see it.

I write educational software, games, data processing and back-end stuff. Maybe
they are more prevalent in these.

Regards,

Mark.

-- 
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Telephone: (0121) 247 1596
International: 0044 121 247 1596

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/



------------------------------

Date: Sun, 14 Jan 2007 20:04:15 GMT
From: markhobley@hotpop.deletethisbit.com (Mark Hobley)
Subject: Re: Ascii characters in a loop
Message-Id: <4cdq74-gjn.ln1@neptune.markhobley.yi.org>

Uri Guttman <uri@stemsystems.com> wrote:
> 
> what is this 'documenting perl'? perl IS documented and very well at
> that. and there are tons of books about perl. what do you expect to
> bring to the table and make it worthy of reading?

Tutorial stuff really. I have read tutorials, but I keep finding quirky
behaviour that the tutorials forgot to mention.

I don't like perldoc. It is difficult to digest, and doesn't give enough 
examples, and the reference books that I have spent a small fortune on, don't
mention some of the pitfalls that I am encountering.

Regards,

Mark.

-- 
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Telephone: (0121) 247 1596
International: 0044 121 247 1596

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/



------------------------------

Date: Sun, 14 Jan 2007 15:31:50 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Ascii characters in a loop
Message-Id: <x7irf9s62x.fsf@mail.sysarch.com>

>>>>> "MH" == Mark Hobley <markhobley@hotpop.deletethisbit.com> writes:

  MH> Uri Guttman <uri@stemsystems.com> wrote:
  >> 
  >> what is this 'documenting perl'? perl IS documented and very well at
  >> that. and there are tons of books about perl. what do you expect to
  >> bring to the table and make it worthy of reading?

  MH> Tutorial stuff really. I have read tutorials, but I keep finding
  MH> quirky behaviour that the tutorials forgot to mention.

almost all perl tutes on the web suck donkey dick. everytime i hear of
one i check it out and see how fast i can find stupid bugs and
comments. i have rarely been disappointed. in my future copious spare
time i will make a page of perl tutes hall of shame. 

  MH> I don't like perldoc. It is difficult to digest, and doesn't give
  MH> enough examples, and the reference books that I have spent a small
  MH> fortune on, don't mention some of the pitfalls that I am
  MH> encountering.

you don't understand that perldoc is documentation and not tutorial. but
there are a fair number of tutes in there now. 

just as a warning to you, writing perl tutes is not easy (witness all
the bad ones out there). if you have trouble reading and comprehending
the existing docs (as with your magic increment issue) bodes poorly for
your proposed tute. i could be wrong but the odds are with me. i know
many perl book authors and how sharp they are and how much perl they
know. to write a tute you need to know more perl than most hackers,
write extremely well, be able to express concepts clearly, concisely and
have plenty of good examples. this is a tough task for anyone.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


------------------------------

Date: Sun, 14 Jan 2007 15:53:12 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Ascii characters in a loop
Message-Id: <x7ejpxs53b.fsf@mail.sysarch.com>

>>>>> "MH" == Mark Hobley <markhobley@hotpop.deletethisbit.com> writes:

  MH>  perl has no such beast. perldoc perlop covers
  >> magic increment, have you read it? 

  MH> I have now, but I don't think it is really that clear.

clear to me. 

 The auto-increment operator has a little extra builtin magic
     to it.  If you increment a variable that is numeric, or that
     has ever been used in a numeric context, you get a normal
     increment.  If, however, the variable has been used in only
     string contexts since it was set, and has a value that is
     not the empty string and matches the pattern
     "/^[a-zA-Z]*[0-9]*\z/", the increment is done as a string,
     preserving each character within its range, with carry:

         print ++($foo = '99');      # prints '100'
         print ++($foo = 'a0');      # prints 'a1'
         print ++($foo = 'Az');      # prints 'Ba'
         print ++($foo = 'zz');      # prints 'aaa'

what part of that do you find unclear? it shows the rollover case in
numeric and similarly to your example with zz -> aaa.
 
  MH> I often loop through alphabetical sequences in code.
  >> then you must be the odd one. i rarely do and i rarely see it.

  MH> I write educational software, games, data processing and back-end
  MH> stuff. Maybe they are more prevalent in these.

i doubt that. i have coded many different projects and don't see string
increment being needed often. but you could be using the only hammer you
have to work on different nails. i see that all the time.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


------------------------------

Date: Sun, 14 Jan 2007 21:40:25 +0100
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Ascii characters in a loop
Message-Id: <eoe8jb.1k8.1@news.isolution.nl>

Mark Hobley schreef:


> I don't like perldoc. It is difficult to digest, and doesn't give
> enough examples, and the reference books that I have spent a small
> fortune on, don't mention some of the pitfalls that I am encountering.

Actually a nice title for an article: Perl Pitfalls. Last week (and not
here) we discussed Tropical Perl, a book about how far you can get with
Perl in a don't-worry-be-happy style. Perl Pitfalls can be about things
like using 'le' when you shouldn't and about how to solidly spoil the
value of $_ && about how to be bitten best by binops.

-- 
Affijn, Ruud

"Gewoon is een tijger."



------------------------------

Date: Sun, 14 Jan 2007 22:04:20 GMT
From: markhobley@hotpop.deletethisbit.com (Mark Hobley)
Subject: Re: Ascii characters in a loop
Message-Id: <pdlq74-p2o.ln1@neptune.markhobley.yi.org>

Uri Guttman <uri@stemsystems.com> wrote:

> what part of that do you find unclear?

I think that general navigation of this document is not straightforward, and I 
think that where there are fundamental issues that affect basic loops, they 
should be mentioned in the loop section, and the document should provide 
examples.

> you could be using the only hammer you have to work on different nails. i see
 that all the time.

Yeah, that is quite possible. I tend to use generic code, that I may reuse in
other projects.

FYI my background is MSDOS assembly language, so I am having to learn the Unix 
way of doing everything, which just sometimes seems alien to me.

However, it will be nice when I have learnt everything.

Regards,

Mark.

-- 
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Telephone: (0121) 247 1596
International: 0044 121 247 1596

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/



------------------------------

Date: Sun, 14 Jan 2007 16:06:33 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Ascii characters in a loop
Message-Id: <slrneqlab9.2rs.tadmc@tadmc30.august.net>

Mark Hobley <markhobley@hotpop.deletethisbit.com> wrote:
> John Bokma <john@castleamber.com> wrote:
>
>> for ($l = 'a'; $l ne 'aa'; $l++) {
>>    print "$l";
>> }
>
> Yeah! I just think that 'a to z' looks far nicer late on a Friday night when I 
> am trying to debug code.


Then you just need to learn to spell "to" as "..":

   for $l ( 'a' .. 'z' )


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 14 Jan 2007 20:05:26 GMT
From: * Tong * <sun_tong_001@users.sourceforge.net>
Subject: Asynchronous alert
Message-Id: <45aa8d06$0$4827$88260bb3@free.teranews.com>

Hi, 

I'm trying to write an alert detection script. 

Generally, the script loops to detect if the alert criteria is met,
and if so, alert the user. Somewhat like this:

 for(;;){
  my $alerted;
  my $flag=detect_flag
  if($flag){
    alert_user unless $alerted;
    $alerted=1
  }
 }

The 'alert_user' can be as simple as a pop up window via Xdialog. Once the
alert goes off, it might take some time to resolve, but I don't want to
alert user again and again, hence the '$alerted' var. The problem is that
I need a way to clear the '$alerted' var. I think, to make it simple, the
best time is when the user confirm the alert pop up window. 

Now, what's the easiest way to do it? The reason I wanted to use Xdialog is
because it's extreme easy to code, but I can't think of a way to clear the
'$alerted' var.

please help

thanks a lot

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sf.net/techdocs/
  http://xpt.sf.net/tools/

-- 
Posted via a free Usenet account from http://www.teranews.com



------------------------------

Date: Sun, 14 Jan 2007 15:23:56 -0600
From: "Mumia W. (NOSPAM)" <paduille.4060.mumia.w+nospam@earthlink.net>
Subject: Re: Asynchronous alert
Message-Id: <eoe7rn$91t$1@aioe.org>

On 01/14/2007 02:05 PM, * Tong * wrote:
> Hi, 
> 
> I'm trying to write an alert detection script. 
> 
> Generally, the script loops to detect if the alert criteria is met,
> and if so, alert the user. Somewhat like this:
> 
>  for(;;){
>   my $alerted;
>   my $flag=detect_flag
>   if($flag){
>     alert_user unless $alerted;
>     $alerted=1
>   }
>  }
> 
> The 'alert_user' can be as simple as a pop up window via Xdialog. Once the
> alert goes off, it might take some time to resolve, but I don't want to
> alert user again and again, hence the '$alerted' var. The problem is that
> I need a way to clear the '$alerted' var. I think, to make it simple, the
> best time is when the user confirm the alert pop up window. 
> 
> Now, what's the easiest way to do it? The reason I wanted to use Xdialog is
> because it's extreme easy to code, but I can't think of a way to clear the
> '$alerted' var.
> 
> please help
> 
> thanks a lot
> 

Most probably, making $alerted a package variable will do it. You might 
also be able to solve the problem by putting "my $alerted" above the for 
loop.

Since the program you posted is not complete, it's hard to comment further.

Posting Guidelines for comp.lang.perl.misc:
http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

-- 
Windows Vista and your freedom in conflict:
http://www.securityfocus.com/columnists/420/2


------------------------------

Date: 14 Jan 2007 20:59:35 GMT
From: * Tong * <sun_tong_001@users.sourceforge.net>
Subject: Re: Asynchronous alert
Message-Id: <45aa99b7$0$4827$88260bb3@free.teranews.com>

On Sun, 14 Jan 2007 15:23:56 -0600, Mumia W. (NOSPAM) wrote:

>> I'm trying to write an alert detection script. 
>> 
>> Generally, the script loops to detect if the alert criteria is met,
>> and if so, alert the user. Somewhat like this:

 my $alerted;
 for(;;){
  my $flag=detect_flag
  if($flag){
    alert_user unless $alerted;
    $alerted=1
  }
 }

>> The 'alert_user' can be as simple as a pop up window via Xdialog. Once the
>> alert goes off, it might take some time to resolve, but I don't want to
>> alert user again and again, hence the '$alerted' var. The problem is that
>> I need a way to clear the '$alerted' var. I think, to make it simple, the
>> best time is when the user confirm the alert pop up window. 
>> 
>> Now, what's the easiest way to do it? The reason I wanted to use Xdialog is
>> because it's extreme easy to code, but I can't think of a way to clear the
>> '$alerted' var.
>> 
>> please help
>> 
>> thanks a lot
>> 
> 
> Most probably, making $alerted a package variable will do it. You might 
> also be able to solve the problem by putting "my $alerted" above the for 
> loop.

thanks for the suggestion. please see above. Please note that, what I need
is the simplest solution.

> Since the program you posted is not complete, it's hard to comment
> further.

IMHO, as a *general purpose* *high-level* code snip, it is complete. What
only lacks is the way/mechanism to reset $alerted asynchronous, which I
don't know and is asking -- how to reset it determines how the alert_user()
is coded, and there is no need to dive into the detect_flag() at all. 

thanks

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sf.net/techdocs/
  http://xpt.sf.net/tools/

-- 
Posted via a free Usenet account from http://www.teranews.com



------------------------------

Date: 14 Jan 2007 12:56:10 -0800
From: mail4ashok@gmail.com
Subject: backtick and system command
Message-Id: <1168808170.786510.119540@s34g2000cwa.googlegroups.com>

Hi

 I am trying to capture output from another script(Tcl) with in a Perl
script. I read the FAQ's and usenet post's before I posted.

My requirements are
1. Capture output from external script
2. Write the output on STDOUT
3. The output should be unbuffered( basically show output
synchronously)

I can capture and print to STDOUT using
print ($a=`script`);
but the o/p gets buffered. Setting $| has no effect.

I can use Perl system function to redirect but I loose terminal output.

Sorry, If a method is explained in FAQ, it's possible that I did not
understand.

Any example to do this is appreciated.

Thanks



------------------------------

Date: 14 Jan 2007 21:25:10 GMT
From: xhoster@gmail.com
Subject: Re: backtick and system command
Message-Id: <20070114162524.935$z6@newsreader.com>

mail4ashok@gmail.com wrote:
> Hi
>
>  I am trying to capture output from another script(Tcl) with in a Perl
> script. I read the FAQ's and usenet post's before I posted.
>
> My requirements are
> 1. Capture output from external script
> 2. Write the output on STDOUT
> 3. The output should be unbuffered( basically show output
> synchronously)
>
> I can capture and print to STDOUT using
> print ($a=`script`);
> but the o/p gets buffered. Setting $| has no effect.
>
> I can use Perl system function to redirect but I loose terminal output.

How about just using the system function with no redirect?  The subprocess
should inherit and perl's STDOUT and print to it automatically.

Or you could open a pipe to the command:

open my $fh, "some command |" or die $!;
while (<$fh>) {
  print $_;
  push @store, $_;
};

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


------------------------------

Date: 14 Jan 2007 13:38:56 -0800
From: mail4ashok@gmail.com
Subject: Re: backtick and system command
Message-Id: <1168810736.269449.108740@38g2000cwa.googlegroups.com>

Thanks


> How about just using the system function with no redirect?  The subprocess
> should inherit and perl's STDOUT and print to it automatically.


But can you capture the o/p to a var at the same time ?

> Or you could open a pipe to the command:
>
> open my $fh, "some command |" or die $!;
> while (<$fh>) {
>   print $_;
>   push @store, $_;
> };

I havn't tried this, but I will give that a try. Does method wait for
the command to complete
before displaying then it wouldn't meet  my req to have synchronous
o/p.

I was also thinking about piping using tee, but that disturbs my $?
(return status from the command that I am intreted in )

Thanks



------------------------------

Date: Sun, 14 Jan 2007 21:29:15 +0000
From: Nick Wedd <nick@maproom.co.uk>
Subject: cgi problem with "gt" and "lt"
Message-Id: <qvZIA9LrCqqFFApn@maproom.demon.co.uk>

Here is the piece of my code that causes a problem:

  foreach $cc ( param() ) {
    $col = param($cc);

and here is a piece of my cgi argument list:

 gl=6&gt=6&hn=6&mx=6&ni=8

It all works except for when $cc (the key) is "gt" or "lt".  I can guess
what is going on, but I have no idea what I should do about it.  Can
someone please advise?

Nick
-- 
Nick Wedd    nick@maproom.co.uk


------------------------------

Date: 14 Jan 2007 13:51:31 -0800
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: cgi problem with "gt" and "lt"
Message-Id: <1168811491.650960.171100@m58g2000cwm.googlegroups.com>

Nick Wedd wrote:
> Here is the piece of my code that causes a problem:

*What* problem?

>   foreach $cc ( param() ) {
>     $col = param($cc);
>
> and here is a piece of my cgi argument list:
>
>  gl=6&gt=6&hn=6&mx=6&ni=8
>
> It all works

"works" *how*?

> except for when $cc (the key) is "gt" or "lt".  I can guess
> what is going on, but I have no idea what I should do about it.

Should do about *what*?

> Can someone please advise?

Advise about *what*?!

No where in this post have you told us either what you're *trying* to
do, nor how what you're actually doing is failing!  How is anyone
supposed to help you fix your problem, when you haven't told anyone
what the problem is nor even what the goal is?!

Please read the Posting Guidelines for this group.  Seriously.  Right
now.  They are posted here twice a week.  A simple search will reveal
them.  Please do not reply until you read them.

Paul Lalli



------------------------------

Date: 14 Jan 2007 08:08:44 -0800
From: "jupiter" <anil.jupiter9@gmail.com>
Subject: Re: Graph in Perl
Message-Id: <1168790923.962794.233900@q2g2000cwa.googlegroups.com>


zentara wrote:
> On 14 Jan 2007 00:48:36 -0800, "jupiter" <anil.jupiter9@gmail.com>
> wrote:
>
>
> >what i want is when i start program it should extract webpage with
> >lwpcook module
> >process data means clean up n extract vales i want
> >make a database to store these values then
> >it should do some calculation on data already stored
> >display them within program (dont want any graphic file) n update as
> >new data comes (using multithreading)
> >
> >i am able to extract data but not sure how to handle database issue n
> >graph issue as i know perl is not database oriented script language nor
> >graphics oriented. so should i do what i want in perl or vb is better
> >option?
>
> wel, yor righting style makes it hard for me to fig out what u want.
>
> but since you are already using Perl, with LWP and the Database,
> you could make graphs with many different Perl modules. GD is
> often used.
>
>
>
> --
> I'm not really a human, but I play one on earth.
> http://zentara.net/japh.html

I have seen this module it will create png file I dont want to make a
file I want this graph to appear within program n update in real time
as well, means as soon as new data comes it should update graph (data
will be updated in mintues)



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 28
*************************************


home help back first fref pref prev next nref lref last post