"Gary Hawkins" <[EMAIL PROTECTED]> writes: > > my > > $line=qw(1,6.944,"methane",29.6576,70617.28,"*BB",8533.32,2381.0883,0.21); > > Bonk. When using qw (quote words) I thought they had to be separated by white > space: > > $line=qw(1 6.944 "methane" 29.6576 70617.28 "*BB" 8533.32 2381.0883 0.21); > > .... which brings up a question, what if one of the elements is "propyl alcohol" > with quotes needed?
s/qw/qq/; $line=qq(1 6.944 "methane" 29.6576 70617.28 "*BB" 8533.322381.0883 0.21); But since I've seen parens in chemical names, try something else: $line=qq#1 6.944 "methane" 29.6576 70617.28 "*BB" 8533.322381.0883 0.21#; $line=qq!1 6.944 "methane" 29.6576 70617.28 "*BB" 8533.322381.0883 0.21!; $line=qq$1 6.944 "methane" 29.6576 70617.28 "*BB" 8533.322381.0883 0.21$; $line=qq[1 6.944 "methane" 29.6576 70617.28 "*BB" 8533.322381.0883 0.21]; $line=qq{1 6.944 "methane" 29.6576 70617.28 "*BB" 8533.322381.0883 0.21}; I worked with some data files that use Control-g as the delimiter. You can't do that here, however. I think the character must be printable. It's probably a moot point any way since it's only hard coded for the discussion. A real program would read it in a loop while(defined($line = <>)) { # whatever..... } -- Michael R. Wolf All mammals learn by playing! [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]