#!/tool/bin/perl -w use strict; my $file = "/tmp/fbb_test"; open(FILE, $file) || die("ERROR: Unable to open $file for read, exiting...\n"); while () { chomp($_); if ($_ =~ /\/(.+?)$/) { printf("captured $1\n"); } } close(FILE);