in reply to how to Check file type?
Another way to grab the extension is to put the split name in an array and pop the last element.
#!/usr/bin/perl -w my $filename = "this.is.my.filename.txt"; my @bits = split /\./, $filename; print pop @bits;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: how to Check file type?
by TomDLux (Vicar) on Dec 02, 2010 at 19:44 UTC | |
by ChuckularOne (Prior) on Dec 02, 2010 at 20:24 UTC |
In Section
Seekers of Perl Wisdom