Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

translation pattern

Status
Not open for further replies.

thendal

Programmer
Aug 23, 2000
284
When i try to execute this code i am getting an error

translation pattern not terminated at the file.pl line 13.

Could any of you please help me in getting away this error.



@id=(1,2,3,4,5);
$uid=5;
@vcons=("y","n","y","n","y");

for($i=0;$i<@id;$i++)
{
if(($id[$i]) eq $uid)
{
if($selid eq &quot;ve&quot;)
{
if($vcons[$i] eq y)
{
# action to be performed to yes condition
}
else
{
# acton performed if it is not yes condition
}

}
}

}



ThanX

:)

 
Guys i found it,Its because i didn't put within quotes in y(&quot;y&quot;)

instead &quot;y&quot; i placed y.

is y has special meaning in the perl interpretor.?????



 
y works the same as tr:
[tt]y/abc/xyz/;[/tt]
is
[tt]tr/abc/xyz/;[/tt]
the y operator is included to look like sed.
&quot;If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito.&quot;
 
Hence the &quot;Pathologically Eclectic Rubbish Lister&quot; name. :)

-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top