T trampy Established Member โ 15 โ Impact 0 Apr 28, 2008 750 views 1 reply #1 Is there a way to search for a [ in Perl using character codes or other methds? I have tried a \[ escape but that does not work. for example $string = =~ s/[//; Will not work because perl sees the [ and thinks it is an unclosed statement.
Is there a way to search for a [ in Perl using character codes or other methds? I have tried a \[ escape but that does not work. for example $string = =~ s/[//; Will not work because perl sees the [ and thinks it is an unclosed statement.
B bryan1884 Established Member โ 15 โ Impact 2 May 4, 2008 #2 you need to place your backslash before the special character. Are you saying you have tried this? If not i believe this is what it should look like. $string =~ /\[/;
you need to place your backslash before the special character. Are you saying you have tried this? If not i believe this is what it should look like. $string =~ /\[/;