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

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...@perl.org Fo