Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: iztrivane


  • Subject: Re: lug-bg: iztrivane
  • From: Danail Petrow <oneofus@xxxxxxxxxxxxx>
  • Date: Mon, 26 Apr 2004 16:00:24 +0300

Опаля,
Мисля че не си прав :)

> Всеки файл който има празен символ в името си

crew:/home/dido/programing/perl# cat check.pl
#!/usr/bin/perl

$dirname = "test/";

opendir(DIR, $dirname) || die "can't opendir $dirname: $!";
        foreach $file (readdir(DIR)) {
                        unlink $dirname.$file;
}
closedir(DIR);
crew:/home/dido/programing/perl# touch test/"file name"
crew:/home/dido/programing/perl# ls -1 test/
file name
crew:/home/dido/programing/perl# perl -d check.pl

Loading DB routines from perl5db.pl version 1.23
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(check.pl:3):     $dirname = "test/";
  DB<1> n
main::(check.pl:5):     opendir(DIR, $dirname) || die "can't opendir
$dirname: $!";
  DB<1> n
main::(check.pl:6):             foreach $file (readdir(DIR)) {
main::(check.pl:7):                             unlink $dirname.$file;
  DB<1> n
main::(check.pl:9):     closedir(DIR);
  DB<1> q
crew:/home/dido/programing/perl# ls -1 test/
crew:/home/dido/programing/perl#

Нищо лично

Поздрави,
Данаил Петров!

============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.