Help for this page

Select Code to Download


  1. or download this
    my $file = "somename.out";
    my $name     = ( split( /\./, $file ) )[0];
    print "$file - $name\n"; 
    
    # This prints "somename" correctly
    
  2. or download this
    my $file_with_path = "path/somename.out" # or
    my $file_with_path2 = "path/path2/somename.out"