perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wampa (Patrik Ružič)" <wa...@wampa.sk>
Subject Problem with split function
Date Wed, 28 Jul 2004 08:27:13 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<p> I have this code <br>
Input is /something/something/index.html</p>
<pre><tt class="code"><font size="-1">[- $script = $ENV{SCRIPT_NAME} -]
[- @fields = split("/",$script) -]
[+ $fields[3] +]&lt;br /&gt;
[- $script = $fields[3] -]
[+ $script +]&lt;br /&gt;
</font></tt></pre>
<p>Result is index.html<br>
And now I need split index.html on index and html but code below dont
give me this result.</p>
<pre><tt class="code"><font size="-1">[- @field = split(".",$script) -]
[+ @field +]
[+ $field[0] +]&lt;br /&gt;
[+ $field[1] +]&lt;br /&gt;
[+ $field[2] +]&lt;br /&gt;
</font></tt></pre>
<p>where is problem ???<br>
</p>
<p>Thanks<br>
Patrik Ruzic<br>
</p>
</body>
</html>

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message