perl web CGI issue when using a file handle in a subroutine

2010-10-21 Thread Erik Witkop
After much debugging, I have determined that a file handle in a subroutine is making my web CGI ticked off. The browser is saying: Software error: cannot open file <-- For help, please send mail to the webmaster (r...@localhost), giving this error message and the time and date of the error. It

Re: printing grep results in Perl

2010-08-02 Thread Erik Witkop
On Jul 27, 11:34 pm, u...@stemsystems.com ("Uri Guttman") wrote: > >>>>> "EW" == Erik Witkop writes: > >   EW> I have spent half the day looking at map and I still don't get it. > > it is easier than you think. > >   EW> I d

Re: printing grep results in Perl

2010-07-27 Thread Erik Witkop
Hi Uri, I have spent half the day looking at map and I still don't get it. I don't get the EXPR versus BLOCK and how I can treat them differently. I think I am close but my regex is not hitting. /@final_results = map { m/^[a-zA-Z0-9]{3,4}?$/$1/ } @just_cust_codes; foreach (@final_results){ pr

Re: printing grep results in Perl

2010-07-27 Thread Erik Witkop
Thanks Uri. It is time that I learned map. I typically lean on grep and =~ for matching patterns. But map sounds like a great solution. Thanks again. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

printing grep results in Perl

2010-07-27 Thread Erik Witkop
So I have an array full of elements in the following format: 32F--sometext--x F32-sometext12-xxx I am only interested in the first portion before the first hyphen. I am able to grep to get that portion. @grep_results1 = grep(/[a-zA-Z0-9]{2,4}-/, @sho_port_small_array); Now I want to print

Re: how do I replace all the spaces in a string with +

2010-02-25 Thread Erik Lewis
Thanks that probably explains my higher than expected ungeocoded rate. Two weeks of playing with perl and I feel like I know less than when I started. On Feb 25, 2010, at 3:31 AM, "Jenda Krynicky" wrote: From: Erik Lewis print "Enter your address\n"; c

Re: Inserting a pause into a loop

2010-02-24 Thread Erik Lewis
Wow, thank you for your assistance. I was working on the assumption that I got something correct in an earlier script, that was incorrect. I've got some more work to do but your explanation helped me understand where I went wrong. On Feb 24, 2010, at 12:38 PM, John W. Krahn wrote: &

Inserting a pause into a loop

2010-02-24 Thread Erik Lewis
Hi, I'm writing a perl script thats goal is to read a delimited file containing a userid and an address to google maps where the address is converted into latitude and longitude. The problem I'm having is with the result I'm printing. Each line is unique via the userid when its printed but I'm

Re: how do I replace all the spaces in a string with +

2010-02-19 Thread Erik Lewis
lit(/,/, $geocode_csv); #break the csv into fields print "$geoarray[2],$geoarray[3]\n"; #print the longitude and latitude exit 0; On Feb 19, 2010, at 4:00 PM, Sergey Matveev wrote: > Greetings, > > On Fri, Feb 19, 2010 at 03:54:27PM -0500, Eri

how do I replace all the spaces in a string with +

2010-02-19 Thread Erik Lewis
I have to changes all the spaces in a string to +'s. Is there an easy way to do this. The length of the string and the number of spaces will always be changing. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl

Re: Problem printing a string value

2010-02-17 Thread Erik Lewis
On Feb 17, 2010, at 2:52 PM, Erik Lewis wrote: > > On Feb 17, 2010, at 1:07 PM, Rob Dixon wrote: > >> Erik Lewis wrote: >>> I've got a large text file that I'm trying to parse some fields from. I'm >>> using substr to pull the first field and t

Re: Problem printing a string value

2010-02-17 Thread Erik Lewis
On Feb 17, 2010, at 1:07 PM, Rob Dixon wrote: > Erik Lewis wrote: >> I've got a large text file that I'm trying to parse some fields from. I'm >> using substr to pull the first field and that is working just fine, now I'm >> trying to print the valu

Problem printing a string value

2010-02-17 Thread Erik Lewis
I've got a large text file that I'm trying to parse some fields from. I'm using substr to pull the first field and that is working just fine, now I'm trying to print the values between 2 irregular delimiters in this case a "^UT" and a "^". I'm matching it with m/ but I don't seem to be able

grep and substring then uc

2009-01-09 Thread Erik Witkop
Here is what I am trying to do, I want to grep on a semicolon, and then upper case the next character. So if my input data is in the format of Witkop; erik I want to find the semicolon and then uppercase the 'e' in erik. Any help? -- To unsubscribe, e-mail: beginners-unsubscr..

Re: beginner on the windows platform

2006-12-20 Thread Erik Test
has a section entitled "Getting Started". It has a few examples of how to run perl scripts. You may want to look at that. Larry -- Erik

perl modules: PERL5LIB, PREFIX, LIB, and site_perl confusion

2006-07-08 Thread Erik Paulson
My question is why do I have to add the LIB entry when building a perl module to get it to show up where I want it to? Thanks, -Erik -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Regular expression for latin1 letters?

2006-05-14 Thread Erik
Dr.Ruud wrote: Erik schreef: iconv converts 'å' into "Ã¥". Then code2html reconizes à but not ¥ as a letter, so the output of "Aål" is: AÃ¥l OK, that's a bug of code2html. Also, the produced html doesn't signal that it is in UTF-8. I just f

Re: Regular expression for latin1 letters?

2006-05-13 Thread Erik
Dr.Ruud wrote: Erik schreef: This is perl, v5.8.7 built for i686-linux (Gentoo). It seems like it is not the file code2html itself it complains about. I can also colorize the file itself. It is when I try it with "use encoding 'latin1';" on the Ada file that it fa

Re: Regular expression for latin1 letters?

2006-05-13 Thread Erik
Dr.Ruud wrote: Erik schreef: Dr.Ruud: Erik: Right. That code2html is full of those superfluous capture groups, so I guess there is no real need to use (?:...). I think it would be a good idea to fix them at least for the places that I modify. If you dont want to allow

Re: Regular expression for latin1 letters?

2006-05-13 Thread Erik
Dr.Ruud wrote: Erik schreef: I need to recognize latin1 letters in a regexp. How is it done? The reason is that I want to fix a program called code2html, which is written in Perl. I have the following regular expression for Ada identifiers: \\b[a-zA-Z](_?[a-zA-Z0-9])*\\b but this is wrong

Regular expression for latin1 letters?

2006-05-13 Thread Erik
I need to recognize latin1 letters in a regexp. How is it done? The reason is that I want to fix a program called code2html, which is written in Perl. I have the following regular expression for Ada identifiers: \\b[a-zA-Z](_?[a-zA-Z0-9])*\\b but this is wrong because Ada identifiers include a

Re: Browser-specific perl error (taint mode)

2004-03-11 Thread Erik Rieselbach
grateful. FYI, we're running Perl 5.004_04. Server is iPlanet-WebServer-Enterprise/6.0. Thanks again for your help. Best, Erik -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Browser-specific perl error (taint mode)

2004-03-11 Thread Erik Rieselbach
nt, because the program runs without error when called from a non-IE browser. I don't have any easy access to the error logs on my company intranet where this is running, unfortunately. Wouldn't they just give me the same information I get from fatalsToBrowser? Thanks for your help, Best

Browser-specific perl error (taint mode)

2004-03-08 Thread Erik Rieselbach
heck : ""; Any ideas on why this might be happening would be greatly appreciated. Best, Erik Rieselbach

Is a way to pass the reference of a object to subroutine?

2003-05-30 Thread Erik W
Hi guys, Is it a way to pass the reference of an object to subroutine? Maybe I am trying to do something stupid and unnecessary here, but I would like to know if it is possible, how to do it? Why is it stupid? Is there a better way? Thanks a lot! Here is the scripts: $CGI=new CGI; test(\$CGI);

Is a way to pass the reference of a object to subroutine?

2003-05-30 Thread Erik W
Hi, I am trying to do something may be totally unnecessary here; $CGI=new CGI; sub { my ($CGI)[EMAIL PROTECTED]; print $CGI->header, $cgi->start_html(-title=>"Message", -class=>"PageBODY"); print "test\n"; # $tmp1->output; print $c

get COOKIES with 'HTTP_COOKIE' ??

2002-12-16 Thread Erik Browaldh
Hello! what am I doing wrong with these co-operating perl-scripts? the first script sets a cookie, but I cant retrieve them when running the 2nd.. Something wrong with the $cookies=$ENV{'HTTP_COOKIE'}; ? thanks in advanced! Erik the first script wi

Re: help with substitution

2002-12-11 Thread Erik Browaldh
Hi! no, its still not changing the letters (but thanks Rob).. I have a string: $givenword="YY-" and another string (the original) $word="not" now I want $givenword to look like this: $givenword="no-" ? thanks in advanced! Erik Rob Dixon wrote: Hello Erik I

help with substitution

2002-12-11 Thread Erik Browaldh
haracterwise, all I get in the end is like this: $givenword="cowscowscows-" thanks in advanced! Erik -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

help with substitution

2002-12-11 Thread Erik Browaldh
haracterwise, all I get in the end is like this: $givenword="cowscowscows-" thanks in advanced! Erik -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

cookies, cant reach it from $ENV{'HTTP_COOKIE'}

2002-12-09 Thread Erik Browaldh
$cdata; #this doesnt work!! Anybody who can help me? thanks in advanced! Erik -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

transforming strings to an array of characters

2002-12-09 Thread Erik Browaldh
hi everyone! if I have a string, lets say $word="perl"; I want to copy this so I have something like this: @word_list["p","e","r","l"] also, how do I get the length of @word_list? thanks in advance! Erik -- To unsubscribe, e-mail: [EMAIL

MPG123

2002-06-22 Thread Erik Riggenbach
an run the player from the command line. Thanks again. Erik use Audio::Play::MPG123; $player = new Audio::Play::MPG123; open(IN, "/var/www/html/Playlist"); @songs=; print @songs; close(IN); foreach my $element(@songs){ print $#songs; $player->load($element

Question about traversing dirs as well

2002-06-22 Thread Erik Riggenbach
not commented out it's an infinite loop as it processes the . dir over and over. Any help would be much appreciated. Thanks, Erik readmydirs('/mp3'); sub readmydirs{ opendir(DIR, $_[0]); my @lists = readdir DIR; foreach my $element (@lists){ if(-d $element and !/^\.{1,2

Re: Using PERL to script into a UNIX telnet session

2001-11-16 Thread Erik Jacobsen
. - Original Message - From: Kilaru Sambaiah <[EMAIL PROTECTED]> To: Erik Jacobsen <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, November 15, 2001 12:17 PM Subject: Re: Using PERL to script into a UNIX telnet session > On Monday 12 November 2001 10:36 pm, Erik Jac

Using PERL to script into a UNIX telnet session

2001-11-12 Thread Erik Jacobsen
I am looking for a way to use PERL to script into a open telnet session. The script would be executing on a Redhat 7.1 Box. I have played with system keyword, but it seems that that is for calling one specific proccess. Any help would be appreciated. Thanks Erik Jacobsen [EMAIL PROTECTED

How can I authenticate a user's login password under a shadowed unix system ?

2001-08-31 Thread EriK W
Hi guys, I want to create a script or a cgi script which can authenticate the user login with their unix system password. I know I can use a getent() get the encrypted password, but how I am going to authenticate a user login with this? Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

How can I "sleep" and hundreds milliseconds, shorter than 1 second?

2001-08-08 Thread EriK W
How can I "sleep" and hundreds million seconds, shorter than 1 second? I want to have a short sleep which should be shorter than 1 second, it would be ideal if it can sleep for a radom short time between , say.. 300-800 milliseconds? Thank you! -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: question about sort

2001-07-23 Thread EriK W
Thank you Paul, Randal!!! :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: question about sort

2001-07-20 Thread EriK W
Thanks! Paul, you are really good tutor, It is much clear for me now, But I think I still can't easily distinguish the list and scalar context. Like here, you say it is a list context, just because we are using the "sort" or because the ()[0] ? -- To unsubscribe, e-mail: [EMAIL PROTE

Re: question about sort

2001-07-20 Thread EriK W
Thanks , Paul, but I think I can't make it straight part of because my broken English , so it seems make sense for me, but "Paul" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > --- EriK W <[EMAIL PROTECTED]> wrot

question about sort

2001-07-19 Thread EriK W
Hi guys, I have a question maybe about "sort" or regular expression, @new = sort {($b =~ /=(\d+)/)[0] <=> ($a =~ /=(\d+)/)[0]|| uc($a) cmp uc($b) } @old; I don't really understand this /=(\d+)/ [0] thing, expecially that "=" , what does that mean? Thanks! -- To unsubscribe, e-mail: [EMAI

Re: Hi, what time() ^ $$ means?

2001-07-12 Thread EriK W
ed, thunder crashed and Erik W <[EMAIL PROTECTED]> whispered: > | Thanks a lot, then what << means? > | $$<<15 ??? > > It seems to me that you need to spend some time with a good beginners book, > such as Randal's. Or, at least, the man pages. These questions

Re: Hi, what time() ^ $$ means?

2001-07-10 Thread Erik W
--- "Stephen P. Potter" <[EMAIL PROTECTED]> wrote: > Lightning flashed, thunder crashed and Erik W > <[EMAIL PROTECTED]> whispered: > | time() ^ $$ > | > | What ^ and $$ mean here? > | > | ^ bit xor? > | $$ logic and? > > $$ is a specia

Hi, what time() ^ $$ means?

2001-07-10 Thread Erik W
Hi gurus, I have a dumb question, when I read the book, I saw they generate and seed by using time() ^ $$ What ^ and $$ mean here? ^ bit xor? $$ logic and? Thanks in advance! __ Do You Yahoo!? Get personalized email addresses from Yahoo!