Help for this page

Select Code to Download


  1. or download this
    my $value = "/home/image/office.iso";
    my($fullname, $filename) = $value =~ m< / ( ( [^/]+ ) \. .* ) \z >x;
    ...
    
    fullname - office.iso
    filename - office
    
  2. or download this
    use File::Spec::Functions 'splitpath';
    
    ...
    
    fullname - office.iso
    filename - office