Re: call method by name

2011-04-12 Thread Rob Dixon
On 12/04/2011 15:30, Shawn H Corey wrote: On 11-04-12 10:15 AM, marcos rebelo wrote: On Tue, Apr 12, 2011 at 15:54, Paul Johnson wrote: On Tue, Apr 12, 2011 at 03:26:49PM +0200, marcos rebelo wrote: I have a code like: foreach my $key ( ... ) { my $sub = "get_$key"; $self->$sub; ... } If I

Re: Help using cgi

2011-04-12 Thread Rob Dixon
On 11/04/2011 12:05, prashant kaushal wrote: Hi Di, Yesterday i tried a "Hello world" program in perl using cgi script on a windows platform. The steps i followed were: 1. Made a directory in "C:" and named it "cgi-bin" 2. Wrote my source code file and saved it with "test.cgi" ##

Re: Changing XML Tag Value in Perl

2011-04-12 Thread Rob Dixon
On 13/04/2011 01:42, Carlos Ivan Sosa wrote: > On 4/12/11, Rob Dixon wrote: >> On 12/04/2011 17:22, Carlos Ivan Sosa wrote: >>> >>> Since the structure of the XML output is not so complicated and >>> massive >> >> Carlos this is data. Data grows. >> > > Ohh sorry, misread. No I don't think so. Y

Re: Changing XML Tag Value in Perl

2011-04-12 Thread Carlos Ivan Sosa
On 4/12/11, Rob Dixon wrote: > On 12/04/2011 17:22, Carlos Ivan Sosa wrote: >> >> Since the structure of the XML output is not so complicated and >> massive > > Carlos this is data. Data grows. > Ohh sorry, misread. > Rob > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additiona

Re: Changing XML Tag Value in Perl

2011-04-12 Thread Rob Dixon
On 12/04/2011 17:22, Carlos Ivan Sosa wrote: Since the structure of the XML output is not so complicated and massive Carlos this is data. Data grows. Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Changing XML Tag Value in Perl

2011-04-12 Thread Rob Dixon
On 11/04/2011 19:10, Rajpreet wrote: Requirement goes like this. I have perl script reading from a MQ Series queue. This queue has messages in form of XML.For exmpale 1 message is like - New York FINANCE GROUP 123

Re: writing to output using filehandles

2011-04-12 Thread Rob Dixon
On 12/04/2011 01:47, mark baumeister wrote: Hi I am having trouble with my search and replace code in the program below. I can sucessfully copy the input file to the output file but my search and replace is not working. Any hints on what I am doing wrong? Hello Mark. You must tell us what i

Re: Regular Expressions Question

2011-04-12 Thread Rob Dixon
On 11/04/2011 15:21, gkl wrote: OK. So if I understood you correctly, given the following (actual) URLs http://beta.images.theglobeandmail.com/archive/01258/election_heads__1258993cl-3.jpg http://storage.canoe.ca/v1/dynamic_resize/?src=http://www.torontosun.com/news/decision2011/2011/04/06/300_

Re: Regular Expressions Question

2011-04-12 Thread C.DeRykus
On Apr 11, 7:21 am, gklc...@googlemail.com (gkl) wrote: > On Apr 10, 11:03 pm, jwkr...@shaw.ca ("John W. Krahn") wrote: stion on regular expressions as my > > > program is working fine but I was just curious. > > > > Say you have the following URLs: > > > >http://www.test.com/image.gif > > >http://

Re: Changing XML Tag Value in Perl

2011-04-12 Thread Carlos Ivan Sosa
Since the structure of the XML output is not so complicated and massive, you might want to try with the Perl Module "XML::Smart": http://search.cpan.org/~gmpassos/XML-Smart-1.6.9/lib/XML/Smart.pm On 4/11/11, Rajpreet wrote: > Greetings, > > Requirement goes like this. I have perl script reading

Re: call method by name

2011-04-12 Thread Uri Guttman
> "SHC" == Shawn H Corey writes: SHC> On 11-04-12 10:15 AM, marcos rebelo wrote: >> On Tue, Apr 12, 2011 at 15:54, Paul Johnson wrote: >>> > On Tue, Apr 12, 2011 at 03:26:49PM +0200, marcos rebelo wrote: >> Hi all >> >> I have a code like: >> >> f

Re: call method by name

2011-04-12 Thread Uri Guttman
> "LS" == Lawrence Statton writes: LS> On 04/12/2011 08:26 AM, marcos rebelo wrote: >> Hi all >> >> I have a code like: >> >> foreach my $key ( ... ) { >> my $sub = "get_$key"; >> $self->$sub; >> ... >> } >> >> If I can do this, I can also do it without the variable

Re: call method by name

2011-04-12 Thread Paul Johnson
On Tue, Apr 12, 2011 at 10:30:06AM -0400, Shawn H Corey wrote: > On 11-04-12 10:15 AM, marcos rebelo wrote: > >On Tue, Apr 12, 2011 at 15:54, Paul Johnson wrote: > >>> On Tue, Apr 12, 2011 at 03:26:49PM +0200, marcos rebelo wrote: > > Hi all > > > > I have a code like: > > > >>>

Re: call method by name

2011-04-12 Thread Shawn H Corey
On 11-04-12 10:15 AM, marcos rebelo wrote: On Tue, Apr 12, 2011 at 15:54, Paul Johnson wrote: > On Tue, Apr 12, 2011 at 03:26:49PM +0200, marcos rebelo wrote: >> Hi all >> >> I have a code like: >> >> foreach my $key ( ... ) { >> my $sub = "get_$key"; >> $self->$sub; >> ...

Re: call method by name

2011-04-12 Thread marcos rebelo
On Tue, Apr 12, 2011 at 15:54, Paul Johnson wrote: > On Tue, Apr 12, 2011 at 03:26:49PM +0200, marcos rebelo wrote: >> Hi all >> >> I have a code like: >> >> foreach my $key ( ... ) { >>    my $sub = "get_$key"; >>    $self->$sub; >>    ... >> } >> >> If I can do this, I can also do it without the

Re: call method by name

2011-04-12 Thread Paul Johnson
On Tue, Apr 12, 2011 at 03:26:49PM +0200, marcos rebelo wrote: > Hi all > > I have a code like: > > foreach my $key ( ... ) { >my $sub = "get_$key"; >$self->$sub; >... > } > > If I can do this, I can also do it without the variable $sub. You can do that. You can also do it without

Re: call method by name

2011-04-12 Thread Lawrence Statton
On 04/12/2011 08:26 AM, marcos rebelo wrote: Hi all I have a code like: foreach my $key ( ... ) { my $sub = "get_$key"; $self->$sub; ... } If I can do this, I can also do it without the variable $sub. What is the syntax? please Best Regards Marcos Rebelo #!/usr/bin/perl use str

call method by name

2011-04-12 Thread marcos rebelo
Hi all I have a code like: foreach my $key ( ... ) { my $sub = "get_$key"; $self->$sub; ... } If I can do this, I can also do it without the variable $sub. What is the syntax? please Best Regards Marcos Rebelo -- Marcos Rebelo http://www.oleber.com/ Milan Perl Mongers leader https:/

[moonb...@gmail.com: Re: Help using cgi]Re: Help using cgi

2011-04-12 Thread Erez Schatz
On Mon, Apr 11, 2011 at 04:05:31AM -0700, prashant kaushal wrote: > Hi Di, > > Yesterday i tried a "Hello world" program in perl using cgi script on a > windows platform. The steps i followed were: > > 1. Made a directory in "C:" and named it "cgi-bin" > 2. Wrote my source code file and saved i

RE: writing to output using filehandles

2011-04-12 Thread Sunita Rani Pradhan
Hi Mark You have opened OUTFILE (OUTFILE, "<$output" ) in read mode . To write to this file you need to open in write mode (">$output"). Sunita -Original Message- From: mark baumeister [mailto:mlfmp...@gmail.com] Sent: Tuesday, April 12, 2011 6:18 AM To: beginners@perl.org Subje

Re: Help using cgi

2011-04-12 Thread Alan Haggai Alavi
Hello Prashant, Yesterday i tried a "Hello world" program in perl using cgi script on a windows platform. Check out the CGI module on CPAN. 3. opened it with my web browser. but now instead of giving the output it just shows the original source code. please help! regards You have to conf

writing to output using filehandles

2011-04-12 Thread mark baumeister
Hi I am having trouble with my search and replace code in the program below. I can sucessfully copy the input file to the output file but my search and replace is not working. Any hints on what I am doing wrong? Thanks, M #!/usr/bin/perl -w use strict; my $input; my $output; my $search; my $rep

Changing XML Tag Value in Perl

2011-04-12 Thread Rajpreet
Greetings, Requirement goes like this. I have perl script reading from a MQ Series queue. This queue has messages in form of XML.For exmpale 1 message is like - New York FINANCE GROUP 123 My perl script read

Re: Regular Expressions Question

2011-04-12 Thread gkl
On Apr 10, 11:03 pm, jwkr...@shaw.ca ("John W. Krahn") wrote: > cityuk wrote: > > Dear All, > > Hello, > > > > > This is more of a generic question on regular expressions as my > > program is working fine but I was just curious. > > > Say you have the following URLs: > > >http://www.test.com/image.

Help using cgi

2011-04-12 Thread prashant kaushal
Hi Di, Yesterday i tried a "Hello world" program in perl using cgi script on a windows platform. The steps i followed were: 1. Made a directory in "C:" and named it "cgi-bin" 2. Wrote my source code file and saved it with "test.cgi" #