Re: Trying to extract an email address

2002-02-14 Thread Leon
- Original Message - From: "Marc Morrison" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> > I have a text file which contains much un-needed data, > but also contains a bunch of email addresses I need. > I have been succesful in the basics of opening the > file and putting the contents into a

Anyone use request tracker before?????

2002-02-14 Thread naive naive
Anyone has use the request tracker before?I tried installing rt but was in vain! Drop me a mail if U have installed rt successfully ;o) thks!~! __ Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail http://mail.yahoo.com --

Re: windows paths

2002-02-14 Thread John W. Krahn
Stuart Clark wrote: > > Hi all, > > I am putting together a script on windows. > > It uses filehandles. > > The problem is that for some reason it dosen't like the path and won't create the >folders and/or file. > > Regards > Stuart Clark > > $OutFile = "c:\\invoices\\current\\sales"; > >

Re: regular expressions

2002-02-14 Thread Brett W. McCoy
On Fri, 15 Feb 2002, terri harrison wrote: > If my input is in the form: > > Name: Happy, Species: Cat, Gender: Male > Name: Peanut, Species: Hamster, Gender: Female > > how come > foreach (keys %names) { > if ($names{$_} =~ /\s*Gender:\s*$gen\s*/i) { > AND > if ($names{$_} =~ /\s*Species:\s*$sp\

Re: regular expressions

2002-02-14 Thread Jeff 'japhy' Pinyan
On Feb 15, terri harrison said: >Name: Happy, Species: Cat, Gender: Male >Name: Peanut, Species: Hamster, Gender: Female > >if ($names{$_} =~ /\s*Gender:\s*$gen\s*/i) { >if ($names{$_} =~ /\s*Species:\s*$sp\s*/i) { > >WORK > >why doesn't >if ($names{$_} =~ /\s*Name:\s*$pn\s*/i) { I can't tell wi

regular expressions

2002-02-14 Thread terri harrison
If my input is in the form: Name: Happy, Species: Cat, Gender: Male Name: Peanut, Species: Hamster, Gender: Female how come foreach (keys %names) { if ($names{$_} =~ /\s*Gender:\s*$gen\s*/i) { AND if ($names{$_} =~ /\s*Species:\s*$sp\s*/i) { WORK why doesn't if ($names{$_} =~ /\s*Name:\s*$pn\s

Re: Help me out

2002-02-14 Thread Brett W. McCoy
On Thu, 14 Feb 2002, Matthew Peter Lyon wrote: > hey, leading off this... a question for the group... are the ways in > programming to solve problems / situations called 'design patterns' ? Well, sorta... 'design patterns' refers to a specific way of analyisng software design. It actually comes

Re: help with extracting text from a string

2002-02-14 Thread Jeff 'japhy' Pinyan
On Feb 14, Bill Akins said: >I have a string that is read in and assigned to a veriable. String >looks something like this: >10.00 c$cpi c$ul (Sample Number:) c$sh /Courier 0 c$fnt ( >SA-01-0C8A8) c$sh ( ) c$sh /Courier 0 c$fnt > >I need the string between the second set of ()'s. There may

help with extracting text from a string

2002-02-14 Thread Bill Akins
Hi all, I have a string that is read in and assigned to a veriable. String looks something like this: 10.00 c$cpi c$ul (Sample Number:) c$sh /Courier 0 c$fnt ( SA-01-0C8A8) c$sh ( ) c$sh /Courier 0 c$fnt I need the string between the second set of ()'s. There may or may not be a leading s

windows paths

2002-02-14 Thread Stuart Clark
Hi all, I am putting together a script on windows. It uses filehandles. The problem is that for some reason it dosen't like the path and won't create the folders and/or file. Regards Stuart Clark $OutFile = "c:\\invoices\\current\\sales"; open (OUTSALES,">$OutFile") || die "could not cre

Trying to extract an email address

2002-02-14 Thread Marc Morrison
Hi all, I am a newbie and really enjoy this list. I have what i am sure is a fairly easy question, but I need help. I have a text file which contains much un-needed data, but also contains a bunch of email addresses I need. I have been succesful in the basics of opening the file and putting th

Re: Regular Expressions - matching the first time

2002-02-14 Thread Jeff 'japhy' Pinyan
On Feb 14, Michael Fowler said: >As mentioned by a couple of people, the non-greedy version of * is one way >of going about it: > >$String =~ /^(.*?):/; > >A faster way, however, is to realize that what you really want is >anything-but-a-colon followed by a colon: > >$String =~ /^([^:]+):

Re: Regular Expressions - matching the first time

2002-02-14 Thread Michael Fowler
On Thu, Feb 14, 2002 at 04:10:06PM -0600, Russ Foster wrote: > I have string, something like: > > $String = "aaa bbb: fffd: sdfsdf qweqd: adfsdf qwcdsfs: qwdq qchuti: > qwiojd"; > > Now, I want to extract everything from the start of the string, up through > the FIRST colon ":" -- in this

Re: Passing an array from a 2-D array

2002-02-14 Thread Michael Fowler
On Thu, Feb 14, 2002 at 04:14:39PM -0500, Ian P. Thomas wrote: > > # The array, unchecked_dfa_states, is going to be an array of arrays ( 2-D ). > # dfa_state_creation is a subroutine that returns an array, and takes an array > # or single number, and a scalar, as parameters. > push @unchecked_d

determine if exe is compiled perl

2002-02-14 Thread John
Does anyone know of a way to tell if an NT exe is a compiled perl script? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Help me out

2002-02-14 Thread Matthew Peter Lyon
hey, leading off this... a question for the group... are the ways in programming to solve problems / situations called 'design patterns' ? I find this is often my stumbling block --> i just have no idea where to start. - Original Message - From: "Naika - EV1" <[EMAIL PROTECTED]> To: "Yac

Re: CPAN

2002-02-14 Thread Elaine -HFB- Ashton
Shaun [[EMAIL PROTECTED]] quoth: *>I have a Linux Box and I am attempting to install perl 5.6. I can get onto CPAN but it wont find *>the perl 5.6 distro. When I search I see it but i can't find the 'keyword' that it will like to http://cpan.valueclick.com/src/ 5.6.1 is the latest stable relea

RE: Help me out

2002-02-14 Thread Dennis G. Wicks
NO! Don't use Matt's Script Archive!!! That code is old and full of errors. Go to http://nms-cgi.sourceforge.net/ and you will find "the rest of the story" and equivalent scripts that are well written and tested. Also, check out http://perl.about.com/ for some good

Re: Regular Expressions - matching the first time

2002-02-14 Thread Brett W. McCoy
On Thu, 14 Feb 2002, Russ Foster wrote: > I have string, something like: > > $String = "aaa bbb: fffd: sdfsdf qweqd: adfsdf qwcdsfs: qwdq qchuti: > qwiojd"; > > Now, I want to extract everything from the start of the string, up through > the FIRST colon ":" -- in this case "aaa bbb". My reg

RE: Regular Expressions - matching the first time

2002-02-14 Thread Balint, Jess
I think maybe $String =~ s/:.*//; would work. -Original Message- From: Russ Foster [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 5:10 PM To: '[EMAIL PROTECTED]' Subject: Regular Expressions - matching the first time I have string, something like: $String = "aaa b

RE: Regular Expressions - matching the first time

2002-02-14 Thread Nikola Janceski
all quantifiers (ie * + {2,7} ) are all "greedy" which means they will try to match as much as possible as long as it's true. To make the quantifier not "greedy" put a ? (question mark) after it, then it will match the least as possible as long as it's true. what you want is $String =~ /

RE: Regular Expressions - matching the first time

2002-02-14 Thread Mark Anderson
The * operator is greedy, grabbing as much of the string as it can with still being able to match. The ? operator limits this behavior, so I think what you want is: $String =~ /^(.*?):/; /\/\ark -Original Message- From: Russ Foster [mailto:[EMAIL

RE: Help me out

2002-02-14 Thread Naika - EV1
Yeah I can honestly say I learn more from analysing other peoples code. I notice some mistakes in books and sometimes that really confuses me. After about 2 years of reading and studying I can now read, understand and manipulate other peoples code but I have yet to write my own from scratch (aside

Regular Expressions - matching the first time

2002-02-14 Thread Russ Foster
I have string, something like: $String = "aaa bbb: fffd: sdfsdf qweqd: adfsdf qwcdsfs: qwdq qchuti: qwiojd"; Now, I want to extract everything from the start of the string, up through the FIRST colon ":" -- in this case "aaa bbb". My regex looks like this: $String =~ /^(.*):/ ;

RE: Help me out

2002-02-14 Thread Timothy Johnson
For my $.02 I'd say that the best book I've come across for teaching the uninitiated is Perl from the Ground Up by Michael McMillan (Osborne/McGraw Hill Publishing). I got more into the O'Reilley books after I was a little more comfortable with Perl. -Original Message- From: Richard C

Re: is it a bug? (less-equal compare)

2002-02-14 Thread Brett W. McCoy
On Thu, 14 Feb 2002, Dittrich G. Michael wrote: > I do: > $lowerlimit = "89" le "100"; > response "" > > I do: > $lowerlimit = "89" le "99"; > response "1" > > please help me! I dont get it! is this a bug? or am I nuts? You are comparing strings here when you really want to be comparing numbers.

RE: Help me out

2002-02-14 Thread Richard Crawford
The books that Matthew suggested are excellent resources, I've found (though I would also recommend "Programming Perl", also from O'Reilly). Another excellent way of learning how to program is read other peoples' code, figure out how to break it and fix it, and adapt it to your own needs. My fat

RE: Help me out

2002-02-14 Thread Naika - EV1
Yeah I agree, I owe about 5 perl books and have read them all but still find it difficult to code the most basic of things. I wish there were more step by step how to's out there. I'm documenting my progress and plan to do a site sometime that caters to the most uneducated of learners. If any site

Re: AW: RE: is it a bug? (less-equal compare)

2002-02-14 Thread Chas Owens
On the command line type perldoc perl for a listing of docs type perldoc -f funcname to get info for individual functions type perldoc -q term to search the faq a particular term ie perldoc -q hash On Thu, 2002-02-14 at 16:21, Dittrich G. Michael wrote: > oh! Thanks! > > by the way: is

Re: octal file permissions

2002-02-14 Thread zentara
On Thu, 14 Feb 2002 07:57:07 -0900, [EMAIL PROTECTED] (Michael Fowler) wrote: >I'm tempted to say oct and sprintf's %o are symmetric, meaning they reverse >each other. You can think of it that way if it helps, but it might confuse >you in the case of oct(0500) and sprintf("%o", 0500). Ok, I ha

Re: is it a bug? (less-equal compare)

2002-02-14 Thread Michael Fowler
On Thu, Feb 14, 2002 at 02:56:46PM -0600, Dittrich G. Michael wrote: > $lowerlimit = "89" le "100"; > response "" [snip] > $lowerlimit = "89" le "99"; > response "1" > > please help me! I dont get it! is this a bug? or am I nuts? Neither, you're just using the wrong operator. 'le' is for string

AW: RE: is it a bug? (less-equal compare)

2002-02-14 Thread Dittrich G . Michael
oh! Thanks! by the way: is there a online source for command reference? My source is really poor! Thanks in forward Von: Nikola Janceski <[EMAIL PROTECTED]> Datum: 2002/02/14 Do PM 03:05:04 GMT-06:00 An: "'[EMAIL PROTECTED]'" <[EMAIL

Re: is it a bug? (less-equal compare)

2002-02-14 Thread Johnathan Kupferer
lt, le, ge, gt, eq, ne and cmp all do lexical comparisons. <, <=, >=, >, ==, !=, and <=> do numerical comparisons. "89" le "100" is false. but "89" <= "100" is true. If you are trying to sort lexcally but you have some numeric data tossed in: @array = ('foo','bar','23 Skidoo','pizza',',100 b

Passing an array from a 2-D array

2002-02-14 Thread Ian P . Thomas
# The array, unchecked_dfa_states, is going to be an array of arrays ( 2-D ). # dfa_state_creation is a subroutine that returns an array, and takes an array # or single number, and a scalar, as parameters. push @unchecked_dfa_states, [ dfa_state_creation( $nfa_start_state, $epsilon ) ]; # I wan

returning a 2-D array to C

2002-02-14 Thread tambas10
Hi, I'm stuck with a bit of a nasty problem. I have a perl sub that returns a 2D array, but now I need to impliment this sub inside of a C program. Unfortunatly, just about all the documentation talks about returning numbers to C, I haven't been able to find anything on strings or 1D arrays, le

RE: is it a bug? (less-equal compare)

2002-02-14 Thread Nikola Janceski
le and ge does a string comparison... you want a numerical comparison < and > "89" le "100" is false because 8 is bigger than 1 on the ASCII chart "89" le "99" is true because 8 is smaller than 9 "98" le "99" is also true... "089" le "100" is true because 0 is smaller than 1 Try it.. but le and

RE: Caching Large Data Structures To Disk

2002-02-14 Thread Bob Showalter
> -Original Message- > From: Balint, Jess [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 14, 2002 3:11 PM > To: '[EMAIL PROTECTED]' > Subject: Caching Large Data Structures To Disk > > > Hello all. First off, I want to thank everybody on this list > who has helped > me with with

is it a bug? (less-equal compare)

2002-02-14 Thread Dittrich G . Michael
I do: $lowerlimit = "89" le "100"; response "" I do: $lowerlimit = "89" le "99"; response "1" please help me! I dont get it! is this a bug? or am I nuts? perl -ver "This is perl, version 5.005_03 built for i386-freebsd" -- berlin.de - meine stadt im netz. Jetzt eigene eMail-adresse @berlin.de s

Re: Caching Large Data Structures To Disk

2002-02-14 Thread Chas Owens
Hashes can be stored in dbm files. Also you can use Data::Dumper to create a string that contains valid Perl syntax to create a give data structure. You can then write that string to a data file. When you need that data again you can read the file back into a string and eval it. See perldoc -

RE: Caching Large Data Structures To Disk

2002-02-14 Thread Timothy Johnson
Just to verify, since you didn't specify, You're not loading the entire file to memory before you start working with it, are you? For example: open(BIGFILE,"log.tmp"); @bigfile = ; probably wouldn't be a great idea. open(BIGFILE,"log.tmp"); while(){ do something to each line

Caching Large Data Structures To Disk

2002-02-14 Thread Balint, Jess
Hello all. First off, I want to thank everybody on this list who has helped me with with my previous questions. Thank you. I am working with input file of very large size. Sometimes up to and greater than a gig of data. I have previously gotten out of memory errors (people at work don't like when

Re: forks or thread for perl on win32

2002-02-14 Thread Johnathan Kupferer
In parent.pl, >$child{$pid} = {in=>$in,number=>$i,event=>$event,called=>1}; was supposed to be: $child{$pid} = {in=>$in,out=>$out,number=>$i,event=>$event,called=>1}; - Johnathan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: forks or thread for perl on win32

2002-02-14 Thread Johnathan Kupferer
I just responded to a similar post "Forking in NT" but... Use open2 or open3 to comunicate with child processes. If you're just coding for win32 then you may want to also look at the Win32 modules, especcially Process.pm and Event.pm. There are some examples in C:\Perl\site\lib\Win32. Below

Re: String manipulation help needed

2002-02-14 Thread Brett W. McCoy
On Thu, 14 Feb 2002, Brian Johnson wrote: > I need a string in the form > Wed, 18 Jul 2001 14:20 > > Of course my line doesn't quite cut it. > my $emaildate = join " ", $record->{day}, $record->{month}, > $record->{year}, $record->{hour}, $record->{minute}; Just interpolate the variables d

String manipulation help needed

2002-02-14 Thread Brian Johnson
I need a string in the form Wed, 18 Jul 2001 14:20 Of course my line doesn't quite cut it. my $emaildate = join " ", $record->{day}, $record->{month}, $record->{year}, $record->{hour}, $record->{minute}; I'm weak in string manipulation in perl - any help people? -- To unsubscribe, e-mai

Re: Perplexing server error (premature end of script headers)

2002-02-14 Thread zentara
On Wed, 13 Feb 2002 15:54:16 -0500, [EMAIL PROTECTED] (Peter Cline) wrote: >I am getting a premature end of script headers error when running a >particular script from a browser. It runs fine the command line, printing >the proper header and all. Just out of curiosity I tried to run your scri

Re: Urgent - Getting the left most 3 characters from a string...

2002-02-14 Thread Chris
Tanton Gibbs wrote: > You need to use == for comparison (that is two equal signs ), you are just > using one and that means assignment. > > For example, > > my $value = 100; > print "value = $value\n"; > > if( $value == 300 ) { > print "value = $value\n"; > } > elsif( $value = 200 ) { > pri

Re: Very Basic Help

2002-02-14 Thread James Taylor
You should probably read about about the CGI module before attempting to create CGI programs... BUT, to answer your question, you would do something like this: #!/usr/bin/perl use CGI qw/:standard/; use strict; my $test = 1000; print header; print start_html; print "$test\n"; print end_ht

Re: Urgent - Getting the left most 3 characters from a string...

2002-02-14 Thread Tanton Gibbs
You need to use == for comparison (that is two equal signs ), you are just using one and that means assignment. For example, my $value = 100; print "value = $value\n"; if( $value == 300 ) { print "value = $value\n"; } elsif( $value = 200 ) { print "value = $value\n"; } will print out value

Re: Help can't figure this one out

2002-02-14 Thread James Taylor
Just because you CAN take shortcuts in Perl doesn't necessarily mean that you should. Even though it's less typing, it might be more difficult to understand what's going on to someone else reading your code, or to yourself after looking at the code some time later. That's what I always

Re: sort help

2002-02-14 Thread Michael Fowler
On Thu, Feb 14, 2002 at 12:08:34PM -0500, Yacketta, Ronald wrote: >($name, $date, $time, $wonid, $cheat, $server) = split(/\|/, $a); >($wday,$month,$mday,$year) = split(/\s+/, $date); >($hour,$min,$secs) = split(/:/, $time); >$TIME = timelocal($secs,$min,$hour,$mday,$mon,$year); >

RE: Counting every character in a textfile

2002-02-14 Thread Wagner-David
By using length($_), this should give you a good count. You are not chomping the input, so it will return the linefeed(carriage return). Wags ;) -Original Message- From: Marcus Willemsen [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 09:30 To: [EMAIL PROTECTED] Sub

Counting every character in a textfile

2002-02-14 Thread Marcus Willemsen
Hi all, I'm trying to figure out how to count characters in a textfile. The count has to include all letters, numbers, non-letters, whitespaces, newlines tabs, etc. I was thinking about something along the lines of: #!/usr/bin/perl -w use strict; my $count = 0;

Re: Modifers to the table function of CGI

2002-02-14 Thread Jon Molin
The first couple of hits seems relevant, look there. http://www.google.com/search?hl=en&q=CGI.pm also, in the future send cgi questions to the cgi list /jon James Kelty wrote: > > Hello, > > I have read the CGI.pm documentation that comes with the distibution, but I > can't find any refer

Modifers to the table function of CGI

2002-02-14 Thread James Kelty
Hello, I have read the CGI.pm documentation that comes with the distibution, but I can't find any reference to the modifers of the 'table' function. Basically, I have dynamic data populating each table element, but I would like to standardize the size of each 'td' so it doesn't look ugly. I would

Re: Urgent - Getting the left most 3 characters from a string...

2002-02-14 Thread Chris
Brett W. McCoy wrote: > On Thu, 14 Feb 2002, Chris wrote: > > >>if left($result,3) = "500" Then >>Do whatever >>Else >> Blah Blah Blah >>End If >> >>In Perl I want to do: >> >>if (left($result), 3) = 500 { >>Do whatever; >>} else { >> Blah Blah Blah; >>} >> >>How can I do the lef

sort help

2002-02-14 Thread Yacketta, Ronald
Folks, I have this little sort routine ## ## UGLY HACK to sort the dates correctly ## ($name, $date, $time, $wonid, $cheat, $server) = split(/\|/, $a); ($wday,$month,$mday,$year) = split(/\s+/, $date); ($hour,$min,$secs) = split(/:/, $time); $TIME = timelocal($secs,$min,$hour,$mday,$

Re: unwinding hash or what it is?

2002-02-14 Thread Chas Owens
On Thu, 2002-02-14 at 10:46, [EMAIL PROTECTED] wrote: > On Thu, Feb 14, 2002 at 10:40:20AM -0500, Chas Owens wrote: > > On Thu, 2002-02-14 at 10:19, Martin A. Hansen wrote: > > > > > > hi > > > > > > i have inherited this piece of code and i have been wondering hard about how i >can print the d

Re: octal file permissions

2002-02-14 Thread Michael Fowler
On Thu, Feb 14, 2002 at 10:43:41AM -0500, zentara wrote: > On Wed, 13 Feb 2002 15:14:39 -0900, [EMAIL PROTECTED] (Michael Fowler) wrote: > > >You have it backwards. Octal 100500 is 33088 in decimal. You just did the > >conversion with the oct operator. > > > >You're confused about what oct does

RE: Help me out

2002-02-14 Thread Yacketta, Ronald
its that simple? WoW! I must have fubarbed somewhere, I have those books as well as several others and hell I am not even close to be a pro!/me dreams about the day I can be a perl gawd like Randel (spelling) -Ron > -Original Message- > From: Matthew Peter Lyon [mailto:[EMAIL PROTECTED]]

Re: Urgent - Getting the left most 3 characters from a string...

2002-02-14 Thread Chris Ball
> "chris" == chris <[EMAIL PROTECTED]> writes: chris> if left($result,3) = "500" Then Do whatever Else Blah Blah chris> Blah End If if (substr($result,0,3) == 500) { do(stuff); } else { do(more_stuff); } Note the arguments to substr are the start position (0 - the first digit) and

Re: Help me out

2002-02-14 Thread Matthew Peter Lyon
get the O'Riley learning perl book get the black book get the cookbook ( O'Riley ) you'll be a pro. - Original Message - From: "amrinder singh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 14, 2002 12:24 PM Subject: Help me out > I have just started learning per

Re: Urgent - Getting the left most 3 characters from a string...

2002-02-14 Thread Brett W. McCoy
On Thu, 14 Feb 2002, Chris wrote: > if left($result,3) = "500" Then > Do whatever > Else > Blah Blah Blah > End If > > In Perl I want to do: > > if (left($result), 3) = 500 { > Do whatever; > } else { > Blah Blah Blah; > } > > How can I do the left in Perl if(substr($result

Re: Very Basic Help

2002-02-14 Thread Rob
One thing that I noticed is your shebang line. You have: #!usr/bin/perl I suspect you want: #!/usr/bin/perl -wT Rob Good judgement comes from experience, and experience - well, that comes from poor judgement. On Thu, 14 Feb 2002, Andrew Hughes wrote: > Why do I keep getting a premature end o

Urgent - Getting the left most 3 characters from a string...

2002-02-14 Thread Chris
I am getting the HTTP result codes and trying to parse just the left most 3 characters: 500 Can't connect to www.1k2k3k4j.com:80 (Bad hostname 'www.1k2k3k4j.com') I only want 500 In VB I could use: if left($result,3) = "500" Then Do whatever Else Blah Blah Blah End If In Perl I

RE: Very Basic Help

2002-02-14 Thread Aaron Shurts
Also. I don't have much CGI experience, but couldn't you just nix all those print statements with, 'qq' or 'EOLN'? -_-Aaron -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 7:59 AM To: Hughes, Andrew Cc: [EMAIL PROTECTED] Subject:

RE: Very Basic Help

2002-02-14 Thread Yacketta, Ronald
what errors messages are seen in the web server logs? IE: (linux/appache) what is in /var/logs/httpd/error_log ??? (name might be off, dont have a linux box ate my disposal atm) -Ron > -Original Message- > From: Hughes, Andrew [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 14, 200

Re: Very Basic Help

2002-02-14 Thread Jeff 'japhy' Pinyan
On Feb 14, Hughes, Andrew said: >Why do I keep getting a premature end of script headers error when I try to >run this script? I am going crazy! First, this is better suited for the beginners-cgi mailing list. Second, I suggest you check the... err... checklist at http://www.perl.com/doc/FA

Very Basic Help

2002-02-14 Thread Hughes, Andrew
Why do I keep getting a premature end of script headers error when I try to run this script? I am going crazy! #!usr/bin/perl #hmres1.pl print "Content-type:text/html\n\n"; $test = 100; print "Test\n"; print "\n"; print "$test\n"; print "\n"; print "\n"; Thanks, Andrew -- To unsubscribe

Re: unwinding hash or what it is?

2002-02-14 Thread Martin A. Hansen
On Thu, Feb 14, 2002 at 10:40:20AM -0500, Chas Owens wrote: > On Thu, 2002-02-14 at 10:19, Martin A. Hansen wrote: > > > > hi > > > > i have inherited this piece of code and i have been wondering hard about how i can >print the different @records returned from the subroutine? im not even sure w

Re: octal file permissions

2002-02-14 Thread zentara
On Wed, 13 Feb 2002 15:14:39 -0900, [EMAIL PROTECTED] (Michael Fowler) wrote: >You have it backwards. Octal 100500 is 33088 in decimal. You just did the >conversion with the oct operator. > >You're confused about what oct does; it returns the decimal representation >of an octal value. Also, Pe

RE: Help me out

2002-02-14 Thread Aaron Shurts
I am in the same boat. I have found the best way to do it is to dive right in. I rely heavily on the O'Reilly book, "Programming Perl". It is a pretty complete resource book with a nice function list and really good code explanation. Also another really good resource type of book is from O'Rei

Re: unwinding hash or what it is?

2002-02-14 Thread Chas Owens
On Thu, 2002-02-14 at 10:19, Martin A. Hansen wrote: > > hi > > i have inherited this piece of code and i have been wondering hard about how i can >print the different @records returned from the subroutine? im not even sure whats on >my hand here. is this a hash of arrays or a hash of array re

Re: Forking in NT

2002-02-14 Thread Johnathan Kupferer
My advice is not to use fork if you want your script to run cross platform. You will have enough problems writing cross-platform, multi-process perl code without dragging fork into it. The safest and simplist way to do what you want is to use open2 or open3 to pipe to and from child processe

unwinding hash or what it is?

2002-02-14 Thread Martin A. Hansen
hi i have inherited this piece of code and i have been wondering hard about how i can print the different @records returned from the subroutine? im not even sure whats on my hand here. is this a hash of arrays or a hash of array references? and how do i unwind those? martin, beginning perl

Mail on W2K vs NT

2002-02-14 Thread Victoria Elliott
I got an email script to work on my W2K box using the W32::OLE module, but when I use it on an NT box, I get "Invalid class string" on this line: my $session = Win32::OLE->new('MAPI.session','Logoff'); Can anyone help? V -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

RE: Help me out

2002-02-14 Thread Victoria Elliott
I really suggest the O'Reilly books, "Learning Perl" 3rd edition. ISBN 0-596-00132-0 Also go to www.CPAN.org, and follow the FAQ on what you need to run a Perl environment on your system. After you've setup an environment, you can start by running some examples in the book to get a grasp. V

mbox (email) handlers?

2002-02-14 Thread Brian Johnson
Does anyone have suggestions for Perl packages that would allow me work through email mbox's and change the read status of some emails and delete some emails? Pretty much everything I can find is limited to reading mbox's (or I would have to cycle through a mbox a write emails to keep and mdofied

Re: Perplexing server error (premature end of script headers)

2002-02-14 Thread zentara
On Wed, 13 Feb 2002 15:54:16 -0500, [EMAIL PROTECTED] (Peter Cline) wrote: >I am getting a premature end of script headers error when running a >particular script from a browser. It runs fine the command line, printing >the proper header and all. The first thing to do is check the server logs

RE: Help can't figure this one out

2002-02-14 Thread Bob Showalter
> -Original Message- > From: Bruce Ambraal [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 14, 2002 1:24 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Help can't figure this one out > > > I have written following coding to produce a triangle > pattern(see below); > I no

CPAN

2002-02-14 Thread Shaun
I have a Linux Box and I am attempting to install perl 5.6. I can get onto CPAN but it wont find the perl 5.6 distro. When I search I see it but i can't find the 'keyword' that it will like to install it. Can anyone help? __ Do You Yahoo!? Send

Re: forks or thread for perl on win32

2002-02-14 Thread Jonathan E. Paton
>Hi All, > > I trying to find some information (examples) about forks > or thread for perl on win32, can anyone help me? > > Basically want to run 'X' simultanous processes in a > continous loop. That is there will alway be 'X' number > of processes running. > [snip] > Is there another/better wa

forks or thread for perl on win32

2002-02-14 Thread insomniak
(please forgive the dulpicate post - last one has wrong subject Doh!) Hi All, I trying to find some information (examples) about forks or thread for perl on win32, can anyone help me? Basically want to run 'X' simultanous processes in a continous loop. That is there will alway be 'X' number of p

Help me out

2002-02-14 Thread amrinder singh
I have just started learning perl a day ago. Can anybody guide me on how to start? I am really interested in learning the language AMRINDER _ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com -

Re: stuck again downloading file

2002-02-14 Thread insomniak
Hi All, I trying to find some information (examples) about forks or thread for perl on win32, can anyone help me? Basically want to run 'X' simultanous processes in a continous loop. That is there will alway be 'X' number of processes running. I thought I could do it with use Thread but I get b

Re: print stock market page every so often

2002-02-14 Thread Frank
On Wed, Feb 13, 2002 at 05:01:33PM -0800, Peter wrote: > hi guys, just wondering if I can use perl to email me > a text based copy of a web page, maybe copy and paste > to a file then e-mail the info. I can probably use > something like a macro in windows nt to create a > procedure or something..

Re: urgent info required

2002-02-14 Thread Frank
On Thu, Feb 14, 2002 at 03:26:13PM +0530, Sreemathi_M wrote: > hi, > > i want to know how to replace a single \ (back slash) with > single / (forward slash) . > > regards, > sreemathi ---end quoted text--- Well the best way to know is to take some time and read some documentat

urgent info required

2002-02-14 Thread Sreemathi_M
hi, i want to know how to replace a single \ (back slash) with single / (forward slash) . please let me know. regards, sreemathi ** This email (including any attachments) is intended for the sole use of

Re: Generating for loop paterns HELP!

2002-02-14 Thread Bruce Ambraal
Hi Everyone had to crawl before they could walk, JON, stop being polite and help me I need your assistance now... Cheers Bruce >>> Jon Molin <[EMAIL PROTECTED]> 02/14/02 12:00PM >>> This smells homework! /jon Bruce Ambraal wrote: > > Hi > > I have done (b) for coding see below, could som

Re: Generating for loop paterns HELP!

2002-02-14 Thread Jon Molin
This smells homework! /jon Bruce Ambraal wrote: > > Hi > > I have done (b) for coding see below, could someone assist with > (a) (b) (d) > > #!/usr/local/bin/perl -w > my $num_rows; > my $i; > my $r; > > $num_rows = ; > > for ($r = 1; $r <= $num_rows; $r++) > { > for ($i=1; $i<=

Re: stuck again downloading file

2002-02-14 Thread Jon Molin
Try removing all cookies you have in your browser and set it to ask for allowing cookies, then you'll really see if there are any cookies /Jon Tanton Gibbs wrote: > > Ok, I'm having a problem downloading a .zip file from a webpage. If I type > in the filename in the browser URL textbox I get r

Generating for loop paterns HELP!

2002-02-14 Thread Bruce Ambraal
Hi I have done (b) for coding see below, could someone assist with (a) (b) (d) #!/usr/local/bin/perl -w my $num_rows; my $i; my $r; $num_rows = ; for ($r = 1; $r <= $num_rows; $r++) { for ($i=1; $i<= $r; $i++) {print (" \n");} for ($i = $num_rows + 1 - $r;$i>=1; $i--){ pr

stuck again downloading file

2002-02-14 Thread Tanton Gibbs
Ok, I'm having a problem downloading a .zip file from a webpage. If I type in the filename in the browser URL textbox I get redirected to the main site. I can navigate through the main site and get to the same web page I typed in and then download the file, but I cannot go directly there. This

Re: finding max value

2002-02-14 Thread Carl Franks
I can't tell by this code alone, but does the benchmark time the entire script that's running, or just the iterate/sort part? i.e. is the 'rand' function timed also, and will the time difference between generating 20 and 10,000 numbers mess up the results? Sorry I can't test this myself, I'm at

Re: Help can't figure this one out

2002-02-14 Thread John W. Krahn
Bruce Ambraal wrote: > > I have written following coding to produce a triangle pattern(see below); > I now want to produce following paterns I can't figer this out > > (a)(b) (c) (d) diamond >** * * * * * * *

Re: Sites

2002-02-14 Thread Steven Maroney
setup your own server !?!!? On Wed, 13 Feb 2002, Naveen Parmar wrote: > Any recommendations on free Web sites where you may upload Perl scripts and > execute CGI scripts? > > TIA, > - NP > > > > _ > Get your FREE download of

Re: regex question

2002-02-14 Thread Jon Molin
sorry about that answer, too early in the morning to answer questions...i even thought it was the newest. I wish I could go back to sleep /jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regex question

2002-02-14 Thread Jon Molin
rory oconnor wrote: > > I am using LWP to hit a page and save the source to a file. But before > it saves it I want it to strip out the client id from the urls. They > are always in the same format: > > client=& # 8 digits and then ampersand > > so what I want to strip out is stuff l