in reply to Reg ex question

# you have been shown this, but I have added another 2 digits $variable = "-----;=99;helloworld88"; $variable =~ m/(\d\d)/; print "$1\n"; # 99 -> *the first 2 digit string* in $variable will now be in $1 # Note match will stop with the first \d\d sequence looking L->R # we can get all the \d\d sequences with this regex # the key is the /g at the end which stands for global print "got a $1\n" while $variable =~ m/(\d\d)/g; #Often we might then go on to assign $1 to a variable ie my $number = $1; #You can do this in on step with the expression ($number) = $variable =~ m/(\d\d)/; print "\$number is $number\n"; # you can also capture the values of $1,$2,$3 all at once into a list $record = "John Smith 919 909 900"; ($first,$last,$phone) = $record =~ m/(\w+)\s+(\w+)\s+([\d\s]+)/; print"$first,$last,$phone\n"; # or an array @stuff = $record =~ m/(\w+)\s+(\w+)\s+([\d\s]+)/; # popped this in here for educational purposes # $" is the output record seperator,default is one space $" = ' : '; print "@stuff"; Hope this helps tachyon