On Mon, Jul 10, 2000 at 07:07:44PM +1000, Anthony Rumble wrote:
>
> s/\$ord\{/\$ord\-\>\{/g
>
> Why doesn't that work?
In what? Regex in perl is different to regex in sed, etc.
What are you trying to do? I know what it does, but have no idea what you're
trying to get it to do!
milliways:~$ perl -ne "if (s/\$ord\{/\$ord\-\>\{/g) { print; }"
$ord{ <--- I typed this
$ord->{ <--- as expected, it returned this
milliways:~$
Also, there's no need to quote the - or >, so you could write this as :
milliways:~$ perl -ne "if (s/\$ord\{/\$ord->\{/g) { print; }"
$ord{
$ord->{
milliways:~$
Scott.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug