Re: Exporting in two packages but one file

2007-05-08 Thread Mumia W.
On 05/08/2007 03:58 AM, Martin Barth wrote: Hi all, I have a Package A with serveral subs in it and now I want to make a package A::Types with some constants in it. I have A.pm with: ..some code and subs .. package A::Type; use constant { CONST1 => "foo", CONST2 => "bar"}; package A; ..som

Re: regexp

2007-05-10 Thread Mumia W.
On 05/10/2007 12:54 PM, oryann9 wrote: [...] The strings I need out of this are: msgagt=ESM_WMB_AIX sec_id=Sec_id severity=Low msgnode=qwmbap01.cardinalhealth.net utc={2007-04-26 18:01:59.472+00:00} om={ UID=3a7affd6-f420-11db-80b1- AlertCode=AEM001 AlertType=AEM-default App

Re: OT: Duplicate messages

2007-05-10 Thread Mumia W.
On 05/10/2007 06:39 PM, [EMAIL PROTECTED] wrote: I am not getting duplicates. jerry nope. -Original Message- From: Tom Yarrish <[EMAIL PROTECTED]> Sent: May 10, 2007 5:27 PM To: beginners@perl.org Subject: OT: Duplicate messages -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey a

Re: $1 $2 var confusion

2007-05-12 Thread Mumia W.
On 05/12/2007 09:21 AM, Steve Bertrand wrote: I have two scenarios here, and in the first one, I am not seeing the logic I would normally expect. I'll compact the code as to save everyone from scrolling. I have strict and warnings enabled (as I always do). Can someone tell me why in the first c

Re: $1 $2 var confusion

2007-05-12 Thread Mumia W.
On 05/12/2007 07:00 PM, Rob Dixon wrote: [...] No, it has no effect on $1. I thought it would cause confusion! The statement simply assigns a list to @f. The first element of the list is undef, and the rest is the result of applying the regex to $email, so it's the same as my @f = (undef);

Re: Chinese word problem

2007-05-16 Thread Mumia W.
On 05/16/2007 12:57 AM, Neil wrote: Dear All: Question: How come the length of Chinese word I print shows “ 3 “. Isn’t it supposed to 2 bytes? Program: --- $str=”我”; $str_len = length($str); Print $str_len, “\n\n”; The res

Re: xterm fonts

2007-05-16 Thread Mumia W..
On 05/15/2007 04:38 PM, Deboo ^ wrote: I installed a minimal X sysetm with fluxbox and xterm and two other terminal emulators: eterm and mrxvt. But all three of them give very small fonts. WIth xterm, I was able to get a reasonable font with the HUGE option in the right-click menu but I need bigg

Re: xterm fonts

2007-05-16 Thread Mumia W.
On 05/15/2007 07:04 PM, Mumia W.. wrote: On 05/15/2007 04:38 PM, Deboo ^ wrote: I installed a minimal X sysetm with fluxbox and xterm and two other [...] Sorry, wrong list :-( -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: Regarding files

2007-05-21 Thread Mumia W.
On 05/20/2007 11:37 PM, Dharshana Eswaran wrote: Hi All, The below code helps in reading a file in reverse: use strict; use warning; open( FILE, "<$file_to_reverse" ) or die( "Can't open file file_to_reverse: $!" ); @lines = reverse ; foreach $line (@lines) { # do something with $line } B

Re: Query an IP from file

2007-05-23 Thread Mumia W.
On 05/23/2007 03:01 AM, Jeff Pang wrote: Hello Thomas, I tried your codes,it's good I think. I've modified some of the codes to fit my situation. But if the network data files include too much IPs,my program used up all memory and couldn't get continued. Below are my modified codes.Attachmen

Re: accesing a hash of an array of hashes

2007-05-26 Thread Mumia W.
On 05/26/2007 07:17 AM, pauld wrote: ive read a load of data in from a CSV file with Text::CSV and ended up with a hash (%hash) where the keys are the column labels. my @headings=split(/,/,$rows[0]) and then for (my $j=1;$j<$#rows;$j++) { my $status = $csv->parse ($rows[$j]); # parse a CSV

Why are people e-mailing perl-beginners [at] moderators.isc.org?

2007-05-26 Thread Mumia W.
Why are people CC'ing perl-beginners [at] moderators.isc.org? This mail-list is reflected to the newsgroup, and the perl.beginners newsgroup is not moderated. I've noticed that all of the Google posts (User-Agent: G2/1.0) for the last few weeks in beginners [at] perl.org seem to have this. Is

Re: Outlook CSV Parser

2007-05-30 Thread Mumia W.
On 05/30/2007 12:40 AM, Laxminarayan G Kamath A wrote: Hi PERLers, We here at DeepRoot Linux were trying to parse Outlook's csv so that I can add them to ldap addressbook.. [...] The Perl module Text::CSV_XS would make your work much simpler, and it might execute a little faster. -- To

Re: encode UTF8 -> MIME

2007-05-30 Thread Mumia W.
On 05/29/2007 07:00 PM, cc96ai wrote: I got UTF8 value %C3%A9 how could I encode it become é ? I try encode_base64 , but no luck maybe I miss some, anyone have idea ? You need to provide more detail about your problem. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Outlook CSV Parser

2007-05-30 Thread Mumia W.
On 05/30/2007 03:04 AM, Laxminarayan G Kamath A wrote: [...] I tried a lot of different ways but just could not get the right regexp :-(. I reiterate what the eminent Dr. Ruud said. I need some data to play with before I play with the code you posted. -- To unsubscribe, e-mail: [EMAIL P

Re: Outlook CSV Parser

2007-05-31 Thread Mumia W.
On 05/31/2007 02:32 AM, Laxminarayan G Kamath A wrote: http://download.deeproot.in/~kamathln/outlook-encrtypted-sample.csv Well I asked for it. :-) It's impossible to tell where one record ends and another record begins with that file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: Error:Can't locate object method "prepare" via package "abc" at xyz.pm

2007-05-31 Thread Mumia W.
On 05/31/2007 08:17 AM, Alma wrote: [...] $database_handle = abc->new('test','test123'); [...] No, the 'new' method of 'abc' returns an object of type 'abc'--not a database handle. Review the return statement in abc::new again. sub display() { my $self = shift; my $sth = $database_handle-

Re: Matching of filename regular expression (was:pr warn die question)

2007-06-01 Thread Mumia W.
On 06/01/2007 11:04 AM, Ben Edwards wrote: [...] The variable $flist has something like '*.cvs' in it which I guess is almost but not quite a regular expresion. Any idea how I can find out if $file matches the filename 'mask' $flist. Alternatively is there a way of doing a ls and specifying a f

Re: Error:Can't locate object method "prepare" via package "abc" at xyz.pm

2007-06-01 Thread Mumia W.
On 06/01/2007 12:36 PM, [EMAIL PROTECTED] wrote: On May 31, 2:17 pm, [EMAIL PROTECTED] (Alma) wrote: Hi , Urgent help. [ snip - substantially the same thing as he posted a few days back ] Please, if there is something you find unclear about the answers you are given in a newsgroup or mailing

Re: authentication check from file

2007-06-01 Thread Mumia W.
On 06/01/2007 10:53 AM, Alma wrote: Hi All, I have to store the authentication details like the user_id & password in a file . I do not want to include hard code in my file so basically what i am trying is i wanted to authenticate the user who logged in by reading a file which contains the user

Re: freeze after

2007-06-03 Thread Mumia W.
On 06/03/2007 01:23 AM, Ryan wrote: Hello. This is my first post to the List. I am just getting my feet wet with perl, my first programming language. Welcome to the list Ryan. I'm running perl 5.8.4 on Libranet linux, a now-defunct distro based on out-of-date Debian (Sarge or before, I thi

Re: GMP for Math::BigInt not working ?

2007-06-03 Thread Mumia W.
On 06/03/2007 08:40 AM, David Unric wrote: Any idea why the following code falls back to slow standard Perl implementation of BigInt module instead of highspeed GMP being used ? (no warnings, GMP module _is_ installed) --- use Math::BigInt lib => 'GMP'; my $fac = Math::BigIn

Re: GMP for Math::BigInt not working ?

2007-06-03 Thread Mumia W.
On 06/03/2007 10:42 AM, Mumia W. wrote: [...] the docs say that the Math::GMP module is not used by Math::BigInt::GMP. Math::BigInt::GMP uses the binary GMP library if it's installed, so perhaps you could look there. Duh. Of course you have the binary GMP library installed--othe

Re: Command Splice()

2007-06-05 Thread Mumia W.
On 06/05/2007 08:38 AM, Xu, Lizhe wrote: [...] I am confused about what the splice command does with the shift command = and what the result of the command. Thanks. Hello Lizhe. When you want information about a Perl function, you can get it using the "perldoc" utility, like so: Start->Run->

Re: Leaving this list.

2007-06-05 Thread Mumia W.
On 06/05/2007 06:47 AM, Ron Goral wrote: I am leaving this list even though I've been here for several years. While I find the information and ideas exchanged very helpful, I am fully disgusted by the amount of spam I receive. Over this last weekend, of 172 emails I received from this list, 52 we

Usenet messages are appearing on beginners@perl.org

2007-06-05 Thread Mumia W.
A horrible thing has happened recently. Messages from usenet seem to be appearing here. I remember that messages posted to the list were reflected to the newsgroup perl.beginners, but newsgroup posts to perl.beginners didn't seem to show up here. Now they do :_( I hope this is just a configu

Re: Usenet messages are appearing on beginners@perl.org

2007-06-06 Thread Mumia W.
On 06/05/2007 10:36 PM, Chas Owens wrote: On 6/5/07, Mumia W. <[EMAIL PROTECTED]> wrote: A horrible thing has happened recently. Messages from usenet seem to be appearing here. snip Some of the junk that goes on on usenet doesn't need to happen here. snip The method of connec

Re: Perl can bind bash?

2007-06-06 Thread Mumia W.
On 06/06/2007 02:30 PM, jonatan perry wrote: I would like to know if there is a way to BIND Perl and BASH, can someone suggest a good way? thanks Jonatan Perry. Perhaps you could use the Shell module. What are you trying to do? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: Usenet messages are appearing on beginners@perl.org [perl #43141]

2007-06-06 Thread Mumia W.
On 06/06/2007 08:36 AM, Peter Scott wrote: On Tue, 05 Jun 2007 18:03:09 -0500, Mumia W. wrote: A horrible thing has happened recently. Messages from usenet seem to be appearing here. I remember that messages posted to the list were reflected to the newsgroup perl.beginners, but newsgroup

Re: Usenet messages are appearing on beginners@perl.org [perl #43141]

2007-06-06 Thread Mumia W.
On 06/06/2007 07:54 PM, Mumia W. wrote: [...] This seems to have started around the 23rd of May. No it didn't. I apologize to the list owner and everyone else. There are several news-to-mail gateways that place onto beginners[at]perl.org, and they've been doing it for at least a

Re: Usenet messages are appearing on beginners@perl.org

2007-06-06 Thread Mumia W.
On 06/06/2007 11:23 AM, kens wrote: [...] Am I banished forever? Ken Slater Don't worry. No one is banished. There is a configuration problem, and the more I look into it, the more I think it's related to Google. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Usenet messages are appearing on beginners@perl.org [perl #43141]

2007-06-07 Thread Mumia W.
On 06/07/2007 01:30 AM, Dr.Ruud wrote: "Mumia W." schreef: nntp.perl.org does not seem to allow posting. To me it does. I don't know how reliable it is, but I have been posting and follow-upping :) via that server for quite some time now. Yes, I just noticed. Nntp.perl.org

Re: Usenet messages are appearing on beginners@perl.org [perl #43141]

2007-06-07 Thread Mumia W.
On 06/06/2007 11:37 PM, Mumia W. wrote: On 06/06/2007 07:54 PM, Mumia W. wrote: [...] This seems to have started around the 23rd of May. No it didn't. I apologize to the list owner and everyone else. There are several news-to-mail gateways that place onto beginners[at]perl.org

Re: Usenet messages are appearing on beginners@perl.org [perl #43141]

2007-06-07 Thread Mumia W.
On 06/07/2007 09:27 AM, Tom Yarrish via RT wrote: On Jun 7, 2007, at 3:42 AM, Mumia W. wrote: [...] Before May 25, no messages with an "NNTP-Posting-Host" header appeared on this list. After May 24, such messages started to appear, and *all* of them have a User-Agent of "

Re: Ram disk filling up - File::COPY

2007-06-07 Thread Mumia W.
On 06/07/2007 04:41 AM, Perl WANNABE wrote: Hi, I'm trying to copy a couple of DBM files from a disk to a RAM disk, one of the files is 500M the other quite small. [...] It looks to me like you're trying to copy a 499MB file onto a 254MB ramdisk. Since 499 is greater than 254, the file won't

Re: Usenet messages are appearing on beginners@perl.org [perl #43141]

2007-06-08 Thread Mumia W..
On 06/08/2007 07:57 AM, Peter Scott wrote: On Wed, 06 Jun 2007 19:54:16 -0500, Mumia W. wrote: Are you sure that's not nntp.perl.org? Thunderbird says it can't connect to news.perl.org, and nntp.perl.org does not seem to allow posting. You're right. I'm always making

Re: simple tcp socket server:Is it possible, server wait for '!' sign, not '\n'?

2007-06-10 Thread Mumia W.
On 06/09/2007 09:44 PM, yitzle wrote: [...] If Perl.org wasn't down, you'd want http://perldoc.perl.org/perlvar.html I guess perldoc perlvar will have to do. [...] For the time being, I've placed some of the Perl docs onto my website: http://home.earthlink.net/~mumia.w.18.spam/perldoc/ http://

Re: Writing data row at a time using OLE

2007-06-11 Thread Mumia W.
On 06/11/2007 08:59 AM, ash wrote: Hi everyone! I am using Win32::OLE for writing data in existing Excel file. I would like to know how to write data one row at a time. Writing one cell at a time is too slow, it took 17mins to write 527KB file. Thank you all very much for your help :). You

Re: Database insertion, escape issue

2007-06-12 Thread Mumia W.
On 06/11/2007 06:52 PM, Northstardomus wrote: [...] print "Inserting into Database , @values."; Use the "quotemeta" function to escape special characters that may be in the values. my @values_copy = @values; @values = map quotemeta($_), @values; $dbh->do("INS

Re: Set up env variables on Linux

2007-06-13 Thread Mumia W.
On 06/13/2007 12:26 AM, [EMAIL PROTECTED] wrote: Hi All, I'm pretty new to Perl. I was trying to write up a perl script that can help set up my working env, for example, once log into Linux server, run the perl script, it'll move to another folder and configure some env variables. I tried using

Re: What happened to Getopt::Std ?

2007-06-13 Thread Mumia W.
On 06/13/2007 03:03 AM, Jorge Almeida wrote: http://search.cpan.org/search?m=module&q=getopt&s=21 Hmm: http://search.cpan.org/~tty/kurila-0_02/ Hmm: http://search.cpan.org/src/TTY/kurila-0_02/ It looks like this person, TTY, uploaded a modified version of Perl to his/her CPAN director

Re: What happened to Getopt::Std ?

2007-06-13 Thread Mumia W.
On 06/13/2007 08:29 AM, John Peacock wrote: Mumia W. wrote: I don't know what is going on. It smells like an attempt to compromise people's systems, although it could be a mistake. Then maybe you should use Google or even look at the distro, before making wild accusatio

Re: character encoding & regex

2007-06-16 Thread Mumia W.
On 06/16/2007 02:29 PM, Tom Allison wrote: I'm trying to do some regular expression on strings in email. They could be encoded to something. But I can't tell because I don't have a utf8 unicode xterm window that will show me anything. At best I get ?a?? and other trash like that. I thin

Re: character encoding & regex

2007-06-16 Thread Mumia W.
On 06/16/2007 05:01 PM, Tom Allison wrote: Mumia W. wrote: On 06/16/2007 02:29 PM, Tom Allison wrote: I'm trying to do some regular expression on strings in email. [...] And with unicode and locales and bytes it all gets extremely ugly. I found something that SpamAssassin uses to co

Re: value of variable switches from ' ' to 'value'

2007-06-17 Thread Mumia W.
On 06/17/2007 12:36 AM, Mathew Snyder wrote: [...] In the debugger I've set the 'w' command to watch the variable containing the day being looked for ($day). I would have thought $day stays the same throught an iteration of the while loop but the debugger keeps stopping to tell me it switched fr

Re: Set time period for a statement to execute

2007-06-20 Thread Mumia W.
On 06/20/2007 02:07 AM, anand kumar wrote: Please guide me with some code or documentation for the following problem :- I need to set some specific time for a command to execute. [...] The "alarm" function might help you: At a command prompt, type "perldoc -f alarm" -- To unsubscr

Re: Alternatives to highly nested hashes

2007-06-20 Thread Mumia W.
On 06/20/2007 05:40 AM, Mathew Snyder wrote: It looks like an object is what I want. Am I correct? As always, it depends. Suppose I need to work with a bit of data that actually has 11 attributes. This would be an object of another type. However, I need to manipulate pieces of it differen

Re: Reading a particular line from a file

2007-06-20 Thread Mumia W.
On 06/20/2007 06:42 AM, Nath, Alok (STSD) wrote: Hi, Is it possible to read a particular line by line number ? For e.g reading line 3 from a file. I don't want to read each line and count. Thanks Alok The module Tie::File makes this easy. However, you should probably

Re: Trouble installing with CPAN

2007-06-20 Thread Mumia W.
On 06/20/2007 08:40 AM, yitzle wrote: I took down the firewall and got the same results. Could not fetch authors/id/K/KA/KASEI/Crypt-Simple-0.06.tar.gz Giving up on '/home/Admin/.cpan/sources/authors/id/K/KA/KASEI/Crypt-Simple-0.06.tar.gz' Note: Current database in memory was generated on Sat,

Re: still working with utf8

2007-06-21 Thread Mumia W.
On 06/21/2007 09:42 PM, Tom Allison wrote: OK, I sorted out what the deal is with charsets, Encode, utf8 and other goodies. Now I have something I'm just not sure exactly how it is supposet to operate. I have a string: =?iso-2022-jp?B?Rlc6IBskQjxkJDckNSRHJE8kSiQvJEYzWiQ3JF8kPyQkGyhC?= That i

Re: Uninstalling a PERL module

2007-06-22 Thread Mumia W.
On 06/22/2007 03:46 PM, a_arya2000 wrote: Hello, does anyone know what is the most effective way of uninstalling perl module? Thank you. As you know, going into the build directory for a module and executing "make uninstall" doesn't yet work for CPAN-installed modules :-) For most modules,

Re: nevermind

2007-06-23 Thread Mumia W.
On 06/23/2007 04:30 AM, Mumia W. wrote: [...] You also could have written it this way: open AUTHFILE, "; chomp @email_list; close AUTHFILE; :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: nevermind

2007-06-23 Thread Mumia W.
On 06/23/2007 03:18 AM, Mathew Snyder wrote: You'll notice in the section that creates the filehandle I have a statement that says "next if $address =~ m/^#/gmx;". I had to escape the "#". Can anyone tell me why that is? It isn't a special character for regexes that I've ever seen used. Tha

Re: CPAN shell (LWP, Net::FTP) won't authenticate properly

2007-06-25 Thread Mumia W.
On 06/25/2007 12:40 PM, RICHARD FERNANDEZ wrote: [...] I'm not sure where else to go with this. It looks like I can eventually get what I need installed, but not without a long bumpy ride first. [...] A nice feature for someone to add to CPAN.pm would be the option to set the preferred ftp opt

Re: using a homemade perl module

2007-06-28 Thread Mumia W.
On 06/28/2007 03:00 AM, Mathew Snyder wrote: our @ISA = qw(Exporter); our @EXPORT = qw(startDate endDate searchStart searchEnd); our $VERSION = '1'; Those lines need to be within a BEGIN block. See perlmod: http://perldoc.perl.org/perlmod.html -- To unsubscribe,

Re: using a homemade perl module

2007-06-28 Thread Mumia W.
On 06/28/2007 07:46 AM, Paul Johnson wrote: On Thu, Jun 28, 2007 at 06:58:36AM -0500, Mumia W. wrote: On 06/28/2007 03:00 AM, Mathew Snyder wrote: our @ISA = qw(Exporter); our @EXPORT = qw(startDate endDate searchStart searchEnd); our $VERSION = '1'; Those

Re: using a homemade perl module

2007-06-29 Thread Mumia W.
On 06/28/2007 10:22 PM, Mathew Snyder wrote: I'm getting a strange bit of behaviour. I have everything set up right and my dates are getting made up properly however, one sub which creates the searchDate array isn't being called. I have to enter the full module path (Reports::Dates::searchD

Re: TWO loops and ONE if statement

2007-07-03 Thread Mumia W.
On 07/03/2007 02:53 AM, Amichai Teumim wrote: Hi guys Hello Amichai. [...] I need to sort the @array from lowest to highest using TWO loops and ONE if statement. That's why it's so confusing. I could use a one liner to do all this. I need to do it however as above mentioned. How can I do th

Re: formatting a string

2007-07-04 Thread Mumia W.
On 07/03/2007 08:32 PM, Joseph L. Casale wrote: I have an array with the following data in it: /vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/AN-DC (Win2003 Ent x64).vmx /vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/Disc 1.vmdk /vmfs/volum

Re: trouble reading subdirectories and files in a directory

2007-07-06 Thread Mumia W.
On 07/06/2007 04:46 PM, Chris Ryan wrote: yitzle wrote: 1) There are filesystem modules already out there. 2) You might want to consider using a more generic recursive structure. 3) To answer your question, check its a directory and not a file. while ($yearly = readdir(TOTALHANDLE)) { next unl

Re: Q: cannot use 'use base' without quote ?

2007-07-18 Thread Mumia W.
On 07/18/2007 12:13 AM, Jack Minoshima wrote: [...] Please tell my why I need quote after use base while using strict subs. Thank you very much in advance ! -- jackm The first explanation is that the module's documentation suggests that the quotes are required. The second quick explanation

Re: FILEHANDLE problem

2007-08-01 Thread Mumia W.
On 08/01/2007 02:51 PM, Johnson, Reginald (GTI) wrote: I don't see what I am doing wrong here. I am trying to print to the filehandle LINOUT but nothing is being printed to the file. Ultimately I want to monitor the input file and when it is written to I want to take the update and put into anoth

Re: parsing a log file by date

2007-08-01 Thread Mumia W.
On 08/01/2007 10:24 PM, Jeff Pang wrote: [...] $ perl -e 'print "true" if 1=1' Can't modify constant item in scalar assignment at -e line 1, at EOF Execution of -e aborted due to compilation errors. [...] perl -le 'print "true" if 1==1' perldoc perlop -- To unsubscribe, e-mail: [EMAIL PROT

Re: Howto strip html from a $calar with HTML::Parser

2007-08-03 Thread Mumia W.
On 08/03/2007 03:30 AM, Alan C wrote: [...] I do not need to print to STDOUT Is the print @ line in the sub doing this? [...] Yes. Why not append the text to $string instead of printing the text? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: customizing eof chatacter

2007-08-05 Thread Mumia W.
On 08/05/2007 07:21 AM, Jorge Almeida wrote: Is there some variable that will do for a file what $/ does for a record? What I mean is that in $s= the value of $s depends on the value of $/, but in @arr= I couldn't find a way to force the reading to stop when some character is found. Note

Re: Problem with my code

2007-08-05 Thread Mumia W.
On 08/06/2007 12:32 AM, Jeff Pang wrote: [...] while(my $obj = readdir DIR) { next if $obj =~ /^\.+$/; #or [...] More, precisely, you might use this: next if $obj =~ /\A\.\.?\z/; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] htt

Re: problem with Sterling pound sign

2007-08-06 Thread Mumia W.
On 08/06/2007 05:52 AM, Dermot Paikkos wrote: Hi All, CGI; Mime::Lite; I am trying to take the input from a text field from a html page and send it as an email. The text contains a UK sterling £ sign. It looks fine on in the html page but when I send the mail or output the text to STDERR, it

Re: Conditional module loading

2007-08-07 Thread Mumia W.
On 08/07/2007 10:18 AM, Fermín Galán Márquez wrote: Hi! I'm trying to introduce conditional module loading in a Perl program, but I'm experiencing problems. For example: [...] "Use" is done at compile-time, so both modules will have been loaded before the if statement is executed. When you

Re: Perl LWP post to a web form

2007-08-10 Thread Mumia W.
On 08/10/2007 03:00 PM, Typos wrote: I'm trying to post to a web form and get the results back, I've tried but it seems that I am not posting anything to the page. What am i doing wring ? [...] my $response = $browser->post( $URL, [ 'searchtype' => '3'; ] ); print $response->decoded_con

Re: regex help

2007-08-22 Thread Mumia W..
On 08/21/2007 07:41 AM, Tony Heal wrote: the list is a list of files by version. I need to keep the last 5 versions. Jeff's code works fine except I am getting some empty strings at the beginning that I have not figured out. Here is what I have so far. Lines 34 and 39 are provide a print out f

Re: Redirecting to another url with parameters using post method

2007-08-25 Thread Mumia W.
On 08/25/2007 04:32 PM, Gunnar Hjalmarsson wrote: Jeff Pang wrote: 2007/8/25, Praveena Vittal <[EMAIL PROTECTED]>: I want to redirect to a different url with the parameters in the post method. Well,see 'perldoc CGI' and specially check for, param, redirect. How do you combine a POST reques

Re: Redirecting to another url with parameters using post method

2007-08-25 Thread Mumia W.
On 08/25/2007 07:39 PM, Gunnar Hjalmarsson wrote: Mumia W. wrote: On 08/25/2007 04:32 PM, Gunnar Hjalmarsson wrote: Jeff Pang wrote: 2007/8/25, Praveena Vittal <[EMAIL PROTECTED]>: I want to redirect to a different url with the parameters in the post method. Well,see 'perld

Re: Redirecting to another url with parameters using post method

2007-08-27 Thread Mumia W.
On 08/26/2007 07:47 PM, Gunnar Hjalmarsson wrote: [...] Btw, is this technique properly documented anywhere, or would it be a suitable addition to perlfaq9? It's not asked that frequently. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] htt

Re: Redirecting to another url with parameters using post method

2007-08-27 Thread Mumia W.
On 08/27/2007 03:50 AM, Praveena Vittal wrote: hi All, Thanks for all your replies... Actually i tried the small program like below: #!/usr/bin/perl use CGI; my $query =new CGI; What other stuffs? If those other stuffs output body text, it'll be too l

Re: substitution key->value

2007-08-27 Thread Mumia W.
On 08/27/2007 03:59 AM, Petra Vide Ogrin wrote: Hi all, I have a hash and some prose text and want my perl to identify the keys of the hash in this text and replace them with the corresponding values of the keys. I tried the following foreach (keys %expan) { if ($sbl =~ m/$_/g) { $sbl =~

Re: Problem in opening the file using Tail Module

2007-08-29 Thread Mumia W.
On 08/29/2007 04:41 AM, sivasakthi wrote: Hi Guys, I have used the following code to print the log files. but nothing is printed even it doesn't show the warning message, no prompt is returned. what is the mistake in code , could u help me to find the pbm??? #!/usr/bin/perl use strict; use w

Re: Unable to locate make

2007-08-30 Thread Mumia W.
On 08/30/2007 01:14 AM, kilaru rajeev wrote: Hi All, Hello. [...] Is there any way to promt the shell to ask for the settings again or is there any file which will contain all the details. Please help me. If you want to be able to reconfigure all of the CPAN variables, inside the CPAN

Re: Logging STDERR and other output

2007-08-30 Thread Mumia W.
On 08/30/2007 04:32 AM, Beginner wrote: Hi, I want all the output plus any error messages to got to a log file. I used the BEGIN block to direct STDERR into the file: BEGIN { open(STDERR, ">>/usr/local/myreports/report.log") || die "Can't write to file: $!\n"; } use strict; use war

Re: Logging STDERR and other output

2007-08-30 Thread Mumia W.
On 08/30/2007 09:37 AM, Beginner wrote: [...] I tried the INIT option and that worked also and I liked the fact that my `perl -c myscript.pl` sent it's output to screen and not my log file and I can use a scalar for logfile. q1) Does this still give me the effect of getting any errors from t

Re: Random Image and Cache problem

2007-09-02 Thread Mumia W.
On 09/02/2007 01:16 PM, Carl Miller wrote: I'm trying to setup a simple random image script to allow other websites to display random banner ads located on my server. The other website would call the perl script in an tag, like so: http://www.my_site.com/cgi-bin/random_banner.cgi"; width="468

Re: Random Image and Cache problem

2007-09-03 Thread Mumia W.
On 09/03/2007 10:06 AM, Carl Miller wrote: Thanks Gunnar and Mumia. I figured out that the problem is unique to Internet Explorer. The three other browsers I tried don't have this problem. But I can't get IE to not cache. I've tried these: print "Cache-Control: no-cache\n"; print "Pr

Can not end subscription to beginners at perl.org

2007-09-14 Thread Mumia W.
[EMAIL PROTECTED] sends me an confirmation request, but when I send the message back, I don't get a confirmation, and I keep getting list messages. When I send to [EMAIL PROTECTED], I get a help message back, but it says that the message I sent wasn't sent to any of ezmlm's command addresses.

Re: HTTP Filtering and Threads...

2007-09-15 Thread Mumia W.
I keep getting copies of the message below. I've gotten perhaps 10 copies of it over the last 24 hours. It continues even though I unsubscribed. Return-Path: <[EMAIL PROTECTED]> Received: from noehlo.host ([127.0.0.1]) by mx-various.atl.sa.earthlink.net (EarthLink SMTP Server) with SMT

Re: unable to use perl script with post on university wireless network

2007-09-15 Thread Mumia W.
On 09/15/2007 01:17 PM, perllearner wrote: I am a little stumped as to what is happening, just a few hours ago, I was able to use the same script at home, however on a university wireless, the script just stalls, and even perl package manager gives a error 500. I am a little confused on where to

Re: [perl #45449] Can not end subscription to beginners at perl.org

2007-09-15 Thread Mumia W.
On 09/15/2007 02:00 AM, David Landgren via RT wrote: I have unsubscribed you from [EMAIL PROTECTED] Note that you are still subscribed to beginners-cgi@ Thank you, but I'm still getting list messages. This is the last one I received: Return-Path: <[EMAIL PROTECTED]> Received: from noehlo.

Re: best way of getting a web document

2006-06-24 Thread Mumia W.
Dan wrote: LWP or HTTP::Client? i've used both and run across..some problems. [...] i need the most reliable to fetch the feed, and pass me the body of the page so i can pass it to an xml parser of sort. unless there's something else which can already do that? [...] Hi Dan. I've played with

Re: What does it mean 'LANG=C'

2006-06-25 Thread Mumia W.
Ron Johnson wrote: When US keyboards have the Euro symbol on it, then it will have happened. P.S. - How do you enter a Euro symbol from a US kbd into Tbird? One key on your keyboard might be set aside for composing foreign characters; this is called the Compose key. To enter a Euro (€) symbol

Re: What does it mean 'LANG=C'

2006-06-25 Thread Mumia W.
Mumia W. wrote: Ron Johnson wrote: [...] Oops, I sent to the wrong list. My apologies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: "Misses" in a loop

2006-06-30 Thread Mumia W.
Jean-Charles Ripault wrote: Hi all, For a customer project I'm writing a "firewall proof" script. This script, between two systems tries systematically all tcp ports (up to a given parameter) of all target network. Now, I've made a double loop (one for the IP addresses, one for the ports) to

Re: "Misses" in a loop

2006-06-30 Thread Mumia W.
Mumia W. unfortunately, wrote: The "&" in the 'system' command allows of asynchronous [...] s/allows of/allows for/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Crypt::GPG won't decrypt file...rewrote it to use system, but only partially works

2006-06-30 Thread Mumia W.
RICHARD FERNANDEZ wrote: [...] It decrypts my file successfully. But if I break up the arguments like it says in the doco, like so: my @gpg_command = ("/usr/bin/gpg", "--decrypt", $encrypted, ">", $decrypted, "2> /dev/null"); AFAIK, you can't use "2> file" to do output redirection when

[OT] Can't redirect before fork().

2006-06-30 Thread Mumia W.
I can't seem to redirect STDOUT to a file before forking in my perl program. In the parent, I want to redirect STDOUT to 'logfile' then fork. In the child, I want to print something. That something should end up in the log file, but it's not working. Here is my code: use strict; use warnings; u

Re: [OT] Can't redirect before fork().

2006-06-30 Thread Mumia W.
Mumia W. wrote: I can't seem to redirect STDOUT to a file before forking in my perl program. [...] Forgive me for sending this three times. I was dealing with MUA braindamage. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [OT] Can't redirect before fork().

2006-06-30 Thread Mumia W.
dzhuo wrote: open files are attributes of a process. after you fork, you have 2 processes, files locks, open handles, as well as pending signals and such are not shared. ie, when you print to STDOUT in child, it's not the same STDOUT you expect in parent. why not use a pipe? #!/usr/bin/perl u

Re: [OT] Can't redirect before fork().

2006-07-01 Thread Mumia W.
Tom Phoenix wrote: On 6/30/06, Mumia W. <[EMAIL PROTECTED]> wrote: In the parent, I want to redirect STDOUT to 'logfile' then fork. In the child, I want to print something. That something should end up in the log file, but it's not working. my $child = fork();

Re: Parse XMP file -- foreach problem

2006-07-03 Thread Mumia W.
Andrej Kastrin wrote: [...] $symbol=$e->{symbol}; print "$id|$title|$symbol\n"; } Use the 'ref' command to find out if $symbol is an 'ARRAY' reference. If it is, use 'join' to join all the elements into a string and put it back into $symbol before you print. -- To unsubscribe, e-mail: [EM

Re: FORMAT question

2006-07-05 Thread Mumia W.
Offer Kaye wrote: Hi, Can anyone tell me if it is possible to define 2 different formats for the same filehandle? The reason I am asking is that I want to print 2 different tables to the same text file and I don't want to use printf statements. For me at least, code that uses printf to print som

Re: FORMAT question

2006-07-05 Thread Mumia W.
Offer Kaye wrote: On 7/5/06, Jeff Peng wrote: Hello, I think there are not relation between your implement and the filehandle. As far as I can tell, a format must have the same name as the filehandle to which you want to print it, and once you define a format you cannot change it. So these 2

Re: Leading zero with sprintf and option "f".

2006-07-05 Thread Mumia W.
John Hennessy wrote: [...] I am using %03.4f to provide output that looks like 100. I would like number less than 100. to look like 099. I would like to keep the 3 digits prior to the decimal point either with or without the leading zero as required. Any suggestions welcomed. Than

Re: Hash - narff

2006-07-05 Thread Mumia W.
Beginner wrote: Hi, I am being a bit lazy here. I already had this hash defined (cut & pasted from another file) and didn't want to re-type it. my %char = ( 65 => 'a', 66 => 'b', 67 => 'c', 68 => 'd', [...] But now I need to find the key given the value. EG: Wh

  1   2   3   4   >