At 03:48 PM 4/2/02 -0600, Mr Hash wrote: >So, I'm trying to 'open ($1,">>$file")', where $1 is a string like >"cbQosCMPrePolicyPktOverflow". > >Obviously, with use strict this does not work. How can I make it work? I >need arbitrarily named filehandles. I know, it could get rended with >gobbleworts if the data gets out of hand... Maybe I'm missing something, but why not open my $fh, ">>$file"; You're constructing a unique string in $1 just so you can have a new filehandle? Using open my $fh (not sure whether this was a 5.005-ism or a 5.6-ism) you get a new lexical filehandle which seems to be what you want. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.comThread Previous | Thread Next