Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to understand one line of code 1

Status
Not open for further replies.

jcarrott

Programmer
May 28, 2009
130
US
I need to support this code and I am not sure what it is doing.

next if $file =~ /^\.{1,2}$/;

an example of a file name is
Invoice20100224-1060415.pdf
 
In the directory/folder being looped through, that line is saying to go to skip the current loop iteration if $file is either '.' or '..' (which refer to the current and upper working directories).

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top