Ask a Question related to PERL Beginners, Design and Development.
-
Pablo Fischer #1
Matching String
Hi again!
Im saving some data of a configuration file in scalar var.
My configuration file has something like this:
mailaddr=mail1@yes.com
replymailaddr=mail2@yes.com
Im choosing them with a case statement:
switch ($param) {
case /mailaddr=/i { $envio_mail = $valor; }
case /replymailaddr/i { $envio_reply = $valor; }
}
However Im finding a problem here, cause its stopping twice in replymailaddr.
(I think that it sounds like mailaddr)
So, how can I fix this?, that in each 'case statement' it will mix mailaddr
with replymailaddr?
Thanks!
--
Pablo Fischer Sandoval (pablo@pablo.com.mx)
[url]http://www.pablo.com.mx[/url]
[url]http://www.debianmexico.org[/url]
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: [url]http://www.pablo.com.mx/firmagpg.txt[/url]
Pablo Fischer Guest
-
Aprroximate string matching
I am writing a script to check my newly ripped MP3 music in an INBOX to the stuff that I arleady have in the MUSIC directory. What I need is some... -
Reg. string matching using reg-exp
Hi, I am a novice to perl programming. When I execute the following code, I get always "No Match". I guess my reg-exp is correct. I also tried... -
Pattern matching for xx-xx-xx string
Hello, What is the syntax to make sure the user has entered this pattern in a web form: xx-xx-xx where x are integers, for example:... -
string matching
I need to remove $b from $a $a = "abc/\def/ghi" ; $b = "abc/\def"; Regards Kamal -
String matching not working
Hi, I am quite new to Perl. I have several sets of data and within each individual file news stories are seperated using ========. My goal is... -
Pablo Fischer #2
Re: [solved] Matching String
Again.. Solved.. duh
case /^mailaddr/i, just add a ^ before the matched string.
thanks!
El día Sunday 24 August 2003 5:00 a Pablo Fischer mandó el siguiente correo:--> Hi again!
>
> Im saving some data of a configuration file in scalar var.
>
> My configuration file has something like this:
>
> mailaddr=mail1@yes.com
> replymailaddr=mail2@yes.com
>
> Im choosing them with a case statement:
>
> switch ($param) {
> case /mailaddr=/i { $envio_mail = $valor; }
> case /replymailaddr/i { $envio_reply = $valor; }
> }
>
> However Im finding a problem here, cause its stopping twice in
> replymailaddr. (I think that it sounds like mailaddr)
>
> So, how can I fix this?, that in each 'case statement' it will mix mailaddr
> with replymailaddr?
>
> Thanks!
>
> --
> Pablo Fischer Sandoval (pablo@pablo.com.mx)
> [url]http://www.pablo.com.mx[/url]
> [url]http://www.debianmexico.org[/url]
> GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
> Firma URL: [url]http://www.pablo.com.mx/firmagpg.txt[/url]
Pablo Fischer Sandoval (pablo@pablo.com.mx)
[url]http://www.pablo.com.mx[/url]
[url]http://www.debianmexico.org[/url]
GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C
Firma URL: [url]http://www.pablo.com.mx/firmagpg.txt[/url]
Pablo Fischer Guest



Reply With Quote

