in reply to matching digits

#!/usr/bin/perl -w use strict; while (<DATA>) { /^(\d+).+\/(.+)$/; print "$1 :: $2 \n"; } __DATA__ 3198 X:/bs/al/src/eilass.pl
Of course this is assuming that each line matches. You would need to write conditional code to check that this is true.