Nov 6, 2002 #1 ironpawz IS-IT--Management Oct 8, 2002 44 NZ $cyfgrp[$i] =~ s/\$login\[\$a\]/\$first\[\$a\] \$lastn\[\$a\]/; I am trying to sub $login[$a] for $first[$a] lastn[$a] in $cyfgrp[$i]. I know there is a mistake here but I'm haing trouble figuring it out. Thanks
$cyfgrp[$i] =~ s/\$login\[\$a\]/\$first\[\$a\] \$lastn\[\$a\]/; I am trying to sub $login[$a] for $first[$a] lastn[$a] in $cyfgrp[$i]. I know there is a mistake here but I'm haing trouble figuring it out. Thanks
Nov 6, 2002 #2 m4trix Vendor Jul 31, 2002 84 CA ran into a similar problem in one of my own scripts. gotta put \Q infront of your variables: $cyfgrp[$i] =~ s/\Q$login\[\Q$a\]/\Q$first\[\Q$a\] \Q$lastn\[\Q$a\]/; I think that's right... Upvote 0 Downvote
ran into a similar problem in one of my own scripts. gotta put \Q infront of your variables: $cyfgrp[$i] =~ s/\Q$login\[\Q$a\]/\Q$first\[\Q$a\] \Q$lastn\[\Q$a\]/; I think that's right...
Nov 6, 2002 Thread starter #3 ironpawz IS-IT--Management Oct 8, 2002 44 NZ I got it working actually I took out all the \ I think they where making the special characters literal so I ended up with. $cyfgrp[$i] =~ s/$login[$a]/$first[$a] $lastn[$a]/; Which worked fine. Thanks for the suggestion thought! Upvote 0 Downvote
I got it working actually I took out all the \ I think they where making the special characters literal so I ended up with. $cyfgrp[$i] =~ s/$login[$a]/$first[$a] $lastn[$a]/; Which worked fine. Thanks for the suggestion thought!