I would like to replace all instances of

 @non_space_characters[non_space_characters] with
 $non_space_characters[non_space_characters]

The program below gets the first one only. How do I get the others?

TIA

Owen
---------------------------------------------------
#!/usr/bin/perl -w
use strict;

my $line;
while (<DATA>){
$line=$_;
#$line=~s/(@)(\S+)(\[\S+\])/\$$2$3/g;
$line=~s/(@)(\S+\[\S+\])/\$$2/g;

print "$line\n";

}
__DATA__
@[EMAIL PROTECTED]@banana[4];


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to