Re: Generalized uname

2002-05-12 Thread Mayank Ahuja
ooopss!! i was wrong ... $^O worked According to "perldoc perlvar" : $^O The name of the operating system under which this copy of Perl was built, as determined during the configuration process. The value is identical to $Config{'osname'}. I thou

RE: Generalized uname

2002-05-12 Thread Felix Geerinckx
on Mon, 13 May 2002 06:24:46 GMT, [EMAIL PROTECTED] (Timothy Johnson) wrote: > Are you SURE you can't use $^O? ActiveState's PerlApp, which is part of it's Perl Dev Kit, has no problems whatsoever with $^O. -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Re: Generalized uname

2002-05-12 Thread Jonathan E. Paton
> I've never used perl2exe, I don't know much about it, but are > you 100% sure the interpreter isn't available? That'd make > every eval{} invalid... and certainly a lot of code uses it. > > Try compiling code with: > > eval { print $^O } > > and see what happens. Opps, change {} to "", ev

RE: Generalized uname

2002-05-12 Thread Timothy Johnson
Are you SURE you can't use $^O? -Original Message- From: Mayank Ahuja To: Perl Sent: 5/12/02 11:09 PM Subject: Generalized uname Hi Group! Is there a module, using which i can determine the Operating System on which my perl script is running? I cannot use $^O as the my script will be

Re: Generalized uname

2002-05-12 Thread Jonathan E. Paton
> Is there a module, using which I can determine the Operating > System on which my perl script is running? I cannot use $^O > as the my script will be an executable (using perl2exe) > and therfore the interpreter won't be available during runtime I've never used perl2exe, I don't know much abou

Generalized uname

2002-05-12 Thread Mayank Ahuja
Hi Group! Is there a module, using which i can determine the Operating System on which my perl script is running? I cannot use $^O as the my script will be an executable (using perl2exe) and therfore the interpreter won't be available during runtime I came across a module Sys::Hostname which g

Re: Validation Error

2002-05-12 Thread Bill Lyles
Yes that is correct - Original Message - From: "bob ackerman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 13, 2002 12:56 AM Subject: Re: Validation Error > > On Sunday, May 12, 2002, at 09:38 PM, Bill Lyles wrote: > > > Huh? > > > > i think you are calling an html file

Re: Validation Error

2002-05-12 Thread John W. Krahn
Bill Lyles wrote: > > Ok here is the whole script, and as I said this was generated bt Perbuilder > 2.0 and the email part was generated by Code Magic. > > [snip code] After seeing this code I'm glad I don't use Perlbuilder. Did you actually pay money for this program? :-) John -- use Perl

Re: TIMTOWTDI

2002-05-12 Thread John W. Krahn
Todd Wade wrote: > > This sub grabs http://weather.noaa.gov/pub/data/forecasts/zone/oh/ohz021.txt > with LWP::Simple, extracts the current weather conditions out of the heading > and future forecast, Lowercases the entire string, uppercases the first word > in every sentence, and returns the stri

Re: TIMTOWTDI

2002-05-12 Thread bob ackerman
On Sunday, May 12, 2002, at 11:08 PM, Todd Wade wrote: > > "JosÈ nyimi" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> The Perl slogan is: "There Is More Than One Way To Do It". >> >> I'm interested to see how you will do the small convertion below. > > T

Re: Validation Error

2002-05-12 Thread bob ackerman
On Sunday, May 12, 2002, at 09:38 PM, Bill Lyles wrote: > Huh? > i think you are calling an html file that gets the input and posts to this cgi script. so drieux is confused when you say the whole script. it is the whole cgi, but there is an html file that does the post. > - Original M

Re: Validation Error

2002-05-12 Thread Bill Lyles
Huh? - Original Message - From: "drieux" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 12, 2002 11:24 PM Subject: Re: Validation Error > > On Sunday, May 12, 2002, at 08:13 , Bill Lyles wrote: > > > I have been running this directly from the form in my browser using the >

Re: accessing an array in a hash

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 08:12 , Jonathan E. Paton wrote: first a quick clarification my posting after your original note, sorry we were in flight concurrently, I suck, You RULE! and MAJOR points on the explanation of the delta in the methods. >> may I recommend that you start with

Re: Validation Error

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 08:13 , Bill Lyles wrote: > I have been running this directly from the form in my browser using the > post > method and yes this is the whole script I'm slow, so bare with me here. Let's call your code mycode.cgi and you are calling it in the browser with

Re: kill NT process

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 04:53 , John West wrote: > I found two ways, both of which are OS-specific. One > is this perl: > > http://www.roth.net/perl/scripts/scripts.asp?ProcList.pl that looks like the basic phrameWork for a piece of code. all you would need to do is extend it with a Getop

Re: Validation Error

2002-05-12 Thread Bill Lyles
I have been running this directly from the form in my browser using the post method and yes this is the whole script - Original Message - From: "drieux" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 12, 2002 10:46 PM Subject: Re: Validation Error > > On Sunday, May 12,

Re: accessing an array in a hash

2002-05-12 Thread Jonathan E. Paton
> may I recommend that you start with trying say: > > $hash{1} = [@array1]; > > or > my %hash = ( > 1 => [@array1], > 2 => [@array2], > ); Be aware there is a difference between: [@array1] and: \@array because the former flattens the array, and

Re: TIMTOWTDI

2002-05-12 Thread Todd Wade
"José nyimi" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The Perl slogan is: "There Is More Than One Way To Do It". > > I'm interested to see how you will do the small convertion below. This sub grabs http://weather.noaa.gov/pub/data/forecasts/zone/oh/ohz0

RE: accessing an array in a hash

2002-05-12 Thread Moked, Roee
Thanks all. Great explanation. Roee -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 5:41 AM To: [EMAIL PROTECTED] Subject: Re: accessing an array in a hash > How do I access a field in an array that is a field of a hash? > ex: > %hash > $

Re: accessing an array in a hash

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 06:45 , Moked, Roee wrote: > Hi, > How do I access a field in an array that is a field of a hash? > ex: > %hash > $hash[1] =@array1 > $hash[2] =@array2 > . > > no I want to change $array2[6] via the hash. may I recommend that you start with trying say: $

Re: accessing an array in a hash

2002-05-12 Thread Ahmed Moustafa
Roee Moked wrote: > Hi, > How do I access a field in an array that is a field of a hash? > ex: > %hash > $hash[1] =@array1 > $hash[2] =@array2 > . > > no I want to change $array2[6] via the hash. > > Thanks > Roee M. %hash = (array => ['hello', 'world']); print $hash{"array"}[0]; print $has

Re: Validation Error

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 06:44 , Bill Lyles wrote: > Ok here is the whole script, and as I said this was generated bt > Perbuilder > 2.0 and the email part was generated by Code Magic. this is gonna sound like a silly question - but are you testing this at a command line and not from a webP

Re: accessing an array in a hash

2002-05-12 Thread Jonathan E. Paton
> How do I access a field in an array that is a field of a hash? > ex: > %hash > $hash[1] =@array1 > $hash[2] =@array2 > . > > now I want to change $array2[6] via the hash. The syntax is wrong, you use {} for hashes... and you wouldn't normally use numerical indices. Also, you need to take

Re: Validation Error

2002-05-12 Thread Bill Lyles
Ok here is the whole script, and as I said this was generated bt Perbuilder 2.0 and the email part was generated by Code Magic. #!C:/Perl/bin/perl.exe use Net::SMTP; # This script was generated automatically by Perl Builder(tm): http://www.solutionsoft.com # ***ENDAUTOGEN:HEADER*** Do NOT modify

accessing an array in a hash

2002-05-12 Thread Moked, Roee
Hi, How do I access a field in an array that is a field of a hash? ex: %hash $hash[1] =@array1 $hash[2] =@array2 . no I want to change $array2[6] via the hash. Thanks Roee M. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Validation Error

2002-05-12 Thread bob ackerman
On Sunday, May 12, 2002, at 06:13 PM, Bill Lyles wrote: > if ($email !~ /.+\@.+\..+/) { we assume you are assigning something to $email and the email address with the '@' is single quoted so it doesn't try to interpolate. (or you are escaping the '@' in a double quoted string.) otherwise the

Re: Validation Error

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 06:13 , Bill Lyles wrote: [..] > Everytime I run the form it keeps telling me to enter a valid email > address > wich of course is my own for testing > > Please tell me whats wrong > > $message = "" ; > $found_err = "" ; > > $errmsg = "Please enter a valid email addre

Validation Error

2002-05-12 Thread Bill Lyles
I made a script with Perlbuilder 2.0 to get data from a form, then validate the email address and email the data Everytime I run the form it keeps telling me to enter a valid email address wich of course is my own for testing Please tell me whats wrong $message = "" ; $found_err = "" ; $errmsg

Re: kill NT process

2002-05-12 Thread John West
I found two ways, both of which are OS-specific. One is this perl: http://www.roth.net/perl/scripts/scripts.asp?ProcList.pl Another is this command line tool: http://www.sysinternals.com/ntw2k/freeware/handle.shtml In a way I like the CLT better, it gives me less OS-specific code with the exp

Re: TIMTOWTDI

2002-05-12 Thread Paul Johnson
On Sun, May 12, 2002 at 07:14:27PM +0200, José Nyimi wrote: > I'm interested to see how you will do the small convertion below. > > sub convert { > my($in)=@_; > $in=~/(.)(.*)/; > $in=uc($1).lc($2); > return $in; > } > > The task is simply to upercase the first char of a given string and >

Re: reading config file

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 12:07 , Matthew Harrison wrote: > > i want to read a config file for editing. this config file could be in any > order and could contain lines of junk between the actual config lines. the general form I like is: http://www.wetware.com/drieux/pbl/readConfigFile.txt

kill NT process

2002-05-12 Thread John West
I am stuck on windows working with a process that runs as a service. There's a bug in the process (vendor code) and it doesn't show up in the output of net start, so net stop can't stop it. I need to have a script that kills this process using kill PID, but I am not aware of any command line t

reading config file

2002-05-12 Thread Matthew Harrison
i want to read a config file for editing. this config file could be in any order and could contain lines of junk between the actual config lines. what i want is to have the option to seach for the beginning of the line for something like: 'hostname' then select the rest of the line for modifi

My first script

2002-05-12 Thread Japie
Hello Probebly this isn't the right way to ask something, but sins this is the beginners group I'am trying it. ## I've downloaded an existing perl script wich downloads a file after sending the link via email and sends the download back via email. I adapted it (I'am not an coder and my IQ isn't v

Re: TIMTOWTDI

2002-05-12 Thread John W. Krahn
José nyimi wrote: > > Hello All, Hello, > The Perl slogan is: "There Is More Than One Way To Do It". > > I'm interested to see how you will do the small convertion below. > > Here is one of mine: probably not the best one :-). > > #!/usr/bin/perl > use strict; > use warnings; > > my $out=&c

Re: TIMTOWTDI

2002-05-12 Thread Chris Ball
> "jn" == josenyimi <[EMAIL PROTECTED]> writes: jn> The task is simply to upercase the first char of a given string jn> and lowercase the rest. $string = ucfirst lc $string; Nice try, though. :-) - Chris. -- $a="printf.net"; Chris Ball | chris@void.$a | www.$a | finger: chris@$a

Re: perldoc use Mostly::Readable - Re: Text file manipulation

2002-05-12 Thread Randal L. Schwartz
> "Drieux" == Drieux <[EMAIL PROTECTED]> writes: Drieux> I just do NOT know right off the top of my head, when, Drieux> where or HOW I would use that type of a conditional in a split... @lines = split /\^M\^J|\^J|\^M/, $text_with_unknown_line_endings; -- Randal L. Schwartz - Stonehenge Co

TIMTOWTDI

2002-05-12 Thread José Nyimi
Hello All, The Perl slogan is: "There Is More Than One Way To Do It". I'm interested to see how you will do the small convertion below. Here is one of mine: probably not the best one :-). #!/usr/bin/perl use strict; use warnings; my $out=&convert('abCdE'); print "$out\n"; sub convert { my(

Re: How determine email message size?

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 09:20 , Uriel Wittenberg wrote: > If your objective is to be contrary while appearing to want to help, > perhaps your own objective could use some reassessment. sorry to sound contrary - that is the sound of trying to get my head around the 'solution' given the 'obje

Re: How determine email message size?

2002-05-12 Thread Uriel Wittenberg
If your objective is to be contrary while appearing to want to help, perhaps your own objective could use some reassessment. My objective is perfectly suited to my wishes -- and I believe I know even better than you what my wishes are. I want all emails bigger than a threshold I specify bounced u

Re: Help on syntax

2002-05-12 Thread Eric Beaudoin
At 12:02 2002.05.12, José Nyimi wrote: >Hello All, > >Could you explain this syntax please ? > >$x ||= $y || ''; > >Thanks, > >José. > $a ||= $b is the same as $a = $a || $b; So your exmaple translate to $x = $x || $y || ''; This, I think, means that $x take the value of $y if $x is false (u

Help on syntax

2002-05-12 Thread José Nyimi
Hello All, Could you explain this syntax please ? $x ||= $y || ''; Thanks, José. - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !

Re: foreach, my, and arrays

2002-05-12 Thread drieux
On Monday, May 6, 2002, at 09:47 , Jason Frisvold wrote: > Yeah, I thought of doing it that way too However, my purpose was to > skip the "unnecessary" step and pump the data right into variables. > This way I "drop" the memory needed to go that extra step and I retain > readability of code

Re: XML

2002-05-12 Thread drieux
On Sunday, May 12, 2002, at 12:41 , Gary Hawkins wrote: > http://www.xml.com/pub/a/2002/05/08/ws-easy.html > > It is supposed to be able to compare two XML files. Has anyone used it? no, haven't used it, looks cool let us know. > Can you tell me how to install the module(s)? > > /g there

Re: How determine email message size?

2002-05-12 Thread drieux
On Saturday, May 11, 2002, at 06:27 , Uriel Wittenberg wrote: > I'd appreciate if someone could advise which list is appropriate for the > following question. I'm not sure I understand the question... > I currently have: > > --- > use Mail::Internet; > . > my $item

Unicode to ansi conversion (or normalization)

2002-05-12 Thread Gary Hawkins
I'm going to be working with XML files on Windows. Notice that in Notepad (on W2K+) you can save a file with different encodings, including Unicode. These XML files are Unicode. Opened directly in Notepad, they take on an appearance of having extra spaces between characters. Grep and diff will

XML

2002-05-12 Thread Gary Hawkins
http://www.xml.com/pub/a/2002/05/08/ws-easy.html It is supposed to be able to compare two XML files. Has anyone used it? Can you tell me how to install the module(s)? /g -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: