Re: Perl match problem
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 08:12:13 +0200
yezi wrote:
If I want to find the text wheather match the RD[$j] $j is the any number between -25 to 25, can I write the following sentence : for ($j=-25;$j<=25;$j++) if($parts[0] =~ /RD[$j]/)
I am not sure the is expression, since the code can not work. Thanks
for any comments
You do know that [ and ] are meta characters and must be escaped when matched?
if ($parts[0] =~ /RD\[$j\]/)
-- Josef Möllers (Pinguinpfleger bei FSC) If failure had no penalty success would not be a prize -- T. Pratchett
.
- References:
- Perl match problem
- From: yezi
- Perl match problem
- Prev by Date: Re: array question (newbie)
- Next by Date: Is it possible to resize or crop JPG image with Perl?
- Previous by thread: Re: Perl match problem
- Next by thread: Using Win32::Process::Create with multiple child processes.
- Index(es):
Relevant Pages
|
|