[EMAIL PROTECTED] wrote:
I am still having issues with the output as it looks like this...
eject 0,0,0
eject 0,0,0
eject 0,0,0
I need to insert eject 0,0,0 before the E string, like so:
eject 0,0,0 E00xxx
perl -mstrict -we 'my @x = qw(E12345 45678 E90987);for(@x) { s/(^E?\d{5})/eject\t0,0,0\t$1\n/;print; }'
I'm an idiot :) To set $1 (or $2 or $3 etc) you have to use parens... duh!
Sorry its been a long day :)
That should do it :)
Lee.M - JupiterHost.Net
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>