Re: read the content of a hidden folder in a list

>>>>> "gd" == guba [at] vi-anec de <guba [at] vi-anec.de> writes:

gd> I want to read the content of a hidden folder like

hidden folders in unix are only hidden when listed in a shell without
the -a option to ls. they are never hidden to programs.

gd> $path = '/home/user/.gnome2/folder/folder';

are you sure there is a 'folder' inside the 'folder' dir? odd to see
duplicate names like that in a path.

gd> in a list but with

gd> opendir(DIR, "$path") || die "folder not found" $!;

don't quote scalars like that as it isn't needed and can lead to bugs.

gd> I got an error message.

it helps to actually post the error message! you printed $! but we don't
know what happened out of the many reasons it could have failed.

uri

--
Uri Guttman ------ uri [at] stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------

--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Uri Guttman [ So, 08 Mai 2011 19:45 ] [ ID #2059266 ]
Perl » gmane.comp.lang.perl.beginners » Re: read the content of a hidden folder in a list

Vorheriges Thema: read the content of a hidden folder in a list
Nächstes Thema: Perl function for password encryption and decryption