--On Montag, 06. August 2001 17:38 +0700 Aza Lsaja <[EMAIL PROTECTED]> 
wrote:

> Hello,
> I make a program which need to matching pattern of a scalar.
> I write it as:
>
>  $list = $find =~ \/$scalar\;
>
> but, i get error when execute it as:
> "Search pattern not terminated at  line 12"
>
> then how i matching a scalar variable?

I don't know what you are trying to achieve, and am doubtful that the above 
code achieves anything, but here's at least the source of the error: search 
strings are delimited by FORWARD slashes /, and not by backward ones \. So, 
for instance, to find out whether
a variable contains "gobbledy", you'd write:
if ($variable =~ /gobbledy/) ...

Do "perldoc perlequick" to get the "Perl regular expressions quick start" 
manpage, and "perldoc perlretut" for a regular expressions tutorial. All 
part of the standard perl documentation.

Birgit Kellner



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to