May be this looks a bit more appropriate
my $str = "drwx------ 3 anpatel students 512 Apr 18 14:45 Really Bad Name Name for a file.";
$str =~ s/(S)s/$1/; #1 perms-links
$str =~ s/(S)s/$1/; #2 links-user
$str =~ s/(S)s/$1/; #3 user-grp
$str =~ s/(S)s/$1/; #4 grp-apr
$str =~ s/(S)s/$1/; #5 apr-date
$str =~ s/(S)s/$1/; #6 date-time
$str =~ s/(S)s/$1/; #7 time-filename
$str =~ s/^(S+)s+(.*)/$2/; # remove all the things that were combined previously. result is we get the file name!
print $str,"n";