in reply to Getting a base name
You need to escape the '.' in your split:
Adding -Mstrict and -w (always a good idea), the following works fine for me:$base = ( split(/\./,$fname) );
Update: And, as others have mentioned, you have single quotes inside single quotes, too :)perl -Mstrict -w -e ' my $fname = "test.txt"; my $base = ( split(/\./,$fname) ); print "$base\n";'
Hope that helps ..