develooper Front page | perl.beginners | Postings from January 2002

file name matching

Thread Next
From:
Scott
Date:
January 8, 2002 08:54
Subject:
file name matching
Message ID:
Pine.LNX.4.33.0201081143490.1140-100000@kelly.talon.net
Morning:

I need to scan a directory for files, they will be in pairs, a .tag file 
and a .txt file.  I need to first make sure the .tag file(s) is there.  If 
it is I need to check for the same prefix .txt file.  Here is what I do to 
check for the file:

($scantag) = <*.tag>;

@files = glob("*.tag");

Is there a way to determine the prefix to the file?  xxxxx.tag and 
xxxxx.txt?

Thanks,

-Scott



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About