On Oct 4, 5:19 pm, [EMAIL PROTECTED] (Praveena Vittal) wrote:
> Hi All,
>
> I need a way to replace a backslash(ie:\) with \\ in a string.
>
> Please help me...
>
> eg:ssh\[[\d]*\] from [\d\.]* consider the string
>
> Regards,
> Praveena
$srt =~s/\\//g;
--
To unsubscribe, e-mail: [EMAIL P
On Oct 4, 8:19 am, [EMAIL PROTECTED] (Praveena Vittal) wrote:
> I need a way to replace a backslash(ie:\) with \\ in a string.
>
> Please help me...
$string =~ s{\\}{}g;
The problem is that \ is a special character both to a regular
expression and to a double quoted string, so it needs to b
2007/10/4, Praveena Vittal <[EMAIL PROTECTED]>:
> Hi All,
>
> I need a way to replace a backslash(ie:\) with \\ in a string.
>
Hi,
See this test,
$ perl -e '
> $str = "/usr/local/bin";
> $str =~ s|/|//|g;
> print $str'
//usr//local//bin
Good luck!
--
To unsubscribe, e-mail: [EMAIL PROTECTED
Hi All,
I need a way to replace a backslash(ie:\) with \\ in a string.
Please help me...
eg:ssh\[[\d]*\] from [\d\.]* consider the string
Regards,
Praveena
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
gt; -Original Message-
> From: Paul [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 04, 2001 6:42 PM
> To: justin todd
> Subject: Re: Back slash
> --- justin todd <[EMAIL PROTECTED]> wrote:
> > $dbh = DBI->connect("DBI:ODBC:ok","MITSOL\SQLExec");
&g
> > This is my connect string.
> > $dbh = DBI->connect("DBI:ODBC:ok","MITSOL\SQLExec");
> >
> > This is the error message.
> > Login failed for user 'MITSOLSQLExec'.
> >
> > As you can see the back slash has been omitted
DBI->connect(ok) failed: [Microsoft][ODBC SQL Server Driver][SQL
> Server]Login failed for user 'MITSOLSQLExec'. (SQL-28000)(DBD:
> db_login/SQLConnect err=-1)
>
> As you can see the back slash has been omitted from 'MITSOLSQLExec'.
> Why is this happening? I ha
ft][ODBC SQL Server Driver][SQL
Server]Login failed for user 'MITSOLSQLExec'. (SQL-28000)(DBD:
db_login/SQLConnect err=-1)
As you can see the back slash has been omitted from 'MITSOLSQLExec'. Why
is this happening? I have tried putting two backslashes but that dont
work either.