in reply to writing text to a file

If you're not using formats, I'd use print instead of printf. If you've got quotation marks in your quoted string, try using qq. If "grp" really is a filehandle you opened with open or something, I'd recommend putting it in all caps, or better yet use a lexical filehandle.

# open my $grp, '>', $out or die "Can't write '$out': $!"; print $grp qq{<test:tester username ="$id" group-name="$grp1"/>\n};

Replies are listed 'Best First'.
Re^2: writing text to a file
by Anonymous Monk on Jul 17, 2008 at 18:42 UTC
    Thanks a lot.. I tried the qq and it worked.