Echo Command Help

Hi All

I want to use the echo command to had some lines to a file but the lines i want to have contain " and ;
here is my command

system("echo user_pref("accessibility.typeaheadfind.flashBar", 0); > $profile");

but i think there are too many " and so it barfs

n e ideas
thanks
A

system("echo user_pref(\"accessibility.typeaheadfind.flashBar\", 0); > $profile");

thanks for your speedy reply

i got this error

Bareword found where operator expected at ./tbird line 69, near ""echo system("echo"
        (Missing operator before echo?)
String found where operator expected at ./tbird line 69, near "*\"*accessibility.typeaheadfind.flashBar*\"*, 0); > $profile""
        (Missing operator before "*accessibility.typeaheadfind.flashBar*\"*, 0); > $profile"?)
syntax error at ./tbird line 69, near ""echo system("echo user_pref"
Execution of ./tbird aborted due to compilation errors.

and the code are i using is

system("echo system("echo user_pref(*\"*accessibility.typeaheadfind.flashBar*\"*, 0); > $profile"); > $profile");

thanks

Is that perl? Why don't you do the whole thing in perl? Why invoke "system"?

ah ok, then i am sure you can guess the next questions....

How do i do it in perl, i need to write a bunch of lines to $profile

Use file handles.

open OUTPUT, "> $profile";
print OUTPUT "user_pref(\"accessibility.typeaheadfind.flashBar\", 0);\n"
print OUTPUT "This is line 2\n";
print OUTPUT "This is line 3\n";
close OUTPUT;