#!/usr/bin/perl -w use strict; my $fname; open FNAMES," ) { chomp ($fname) # Does the string start with an "s"? if ( /^$fname/ eq "s" ) { # how do I do the substitution?? printf "hello\n"; } }