SEARCH YOUR SOLUTION HERE  

FAQ 5.35 Why doesn't glob("*.*") get all the files?

This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest ...

Posted On: Tuesday 27th of November 2012 11:52:05 PM Total Views:  542
View Complete with Replies




Related Messages:

FAQ 5.35 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work?   (137 Views)
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.35: Why can't I use "C:\temp\foo" in DOS paths Why doesn't `C:\temp\foo.exe` work Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings ("like\this"), the backslash is an escape character. The full list of these is in "Quote and Quote-like Operators" in perlop. Unsurprisingly, you don't have a file called "ctab)emp(formfeed)oo" or "ctab)emp(formfeed)oo.exe" on your legacy DOS filesystem. Either single-quote your strings, or (preferably) use forward slashes. Since all DOS and Windows versions since something like MS-DOS 2.0 or so have treated "/" and "\" the same in a path, you might as well use the one that doesn't clash with Perl--or the POSIX shell, ANSI C and C++, awk, Tcl, Java, or Python, just to mention a few. POSIX paths are more portable, too. -------------------------------------------------------------------- The perlfaq-workers, a group of volunteers, maintain the perlfaq. They are not necessarily experts in every domain where Perl might show up, so please include as much information as possible and relevant in any corrections. The perlfaq-workers also don't have access to every operating system or platform, so please include relevant details for corrections to examples that do not work on particular platforms. Working code is greatly appreciated. If you'd like to help maintain the perlfaq, see the details in perlfaq.pod.
FAQ 5.35 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work?   (138 Views)
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.35: Why can't I use "C:\temp\foo" in DOS paths Why doesn't `C:\temp\foo.exe` work Whoops! You just put a tab and a formfeed into that filename! Remember that within double quoted strings ("like\this"), the backslash is an escape character. The full list of these is in "Quote and Quote-like Operators" in perlop. Unsurprisingly, you don't have a file called "ctab)emp(formfeed)oo" or "ctab)emp(formfeed)oo.exe" on your legacy DOS filesystem. Either single-quote your strings, or (preferably) use forward slashes. Since all DOS and Windows versions since something like MS-DOS 2.0 or so have treated "/" and "\" the same in a path, you might as well use the one that doesn't clash with Perl--or the POSIX shell, ANSI C and C++, awk, Tcl, Java, or Python, just to mention a few. POSIX paths are more portable, too. -------------------------------------------------------------------- The perlfaq-workers, a group of volunteers, maintain the perlfaq. They are not necessarily experts in every domain where Perl might show up, so please include as much information as possible and relevant in any corrections. The perlfaq-workers also don't have access to every operating system or platform, so please include relevant details for corrections to examples that do not work on particular platforms. Working code is greatly appreciated. If you'd like to help maintain the perlfaq, see the details in perlfaq.pod.
FAQ 5.35 Why doesn't glob("*.*") get all the files?   (130 Views)
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.35: Why doesn't glob("*.*") get all the files Because even on non-Unix ports, Perl's glob function follows standard Unix globbing semantics. You'll need "glob("*")" to get all (non-hidden) files. This makes glob() portable even to legacy systems. Your port may include proprietary globbing functions as well. Check its documentation for details. -------------------------------------------------------------------- The perlfaq-workers, a group of volunteers, maintain the perlfaq. They are not necessarily experts in every domain where Perl might show up, so please include as much information as possible and relevant in any corrections. The perlfaq-workers also don't have access to every operating system or platform, so please include relevant details for corrections to examples that do not work on particular platforms. Working code is greatly appreciated. If you'd like to help maintain the perlfaq, see the details in perlfaq.pod. -- Posted via a free Usenet account from http://www.teranews.com
FAQ 5.35 Why doesn't glob("*.*") get all the files?   (130 Views)
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest version of the complete perlfaq is at http://faq.perl.org . -------------------------------------------------------------------- 5.35: Why doesn't glob("*.*") get all the files Because even on non-Unix ports, Perl's glob function follows standard Unix globbing semantics. You'll need "glob("*")" to get all (non-hidden) files. This makes glob() portable even to legacy systems. Your port may include proprietary globbing functions as well. Check its documentation for details. -------------------------------------------------------------------- The perlfaq-workers, a group of volunteers, maintain the perlfaq. They are not necessarily experts in every domain where Perl might show up, so please include as much information as possible and relevant in any corrections. The perlfaq-workers also don't have access to every operating system or platform, so please include relevant details for corrections to examples that do not work on particular platforms. Working code is greatly appreciated. If you'd like to help maintain the perlfaq, see the details in perlfaq.pod. -- Posted via a free Usenet account from http://www.teranews.com
sprintf doesnt work in s///e syntax.   (267 Views)
perl -le ' ### this part works $var=sprintf "%d", 0x11; print $var; ### and we get 17 output $_ = "{0x11}"; #s/(0x\d+)/hex($1)/e; #### this part works ok and we see a {17} output s/(0x\d+)/sprintf("%d",$1)/e; #### this part does NOT ...
Re: bind double click to resize text widget(s)   (209 Views)
--- listmail@triad.rr.com wrote: > $topw->bind('', \&resize(0)); > $botw->bind('', \&resize(1)); $topw->bind('', [\&resize, 0]); $botw->bind('', [\&resize, 1]); Check out 'perldoc Tk::callbacks' for more info. --Ala __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the ...
bug in getOpenFile / getCloseFile in Windows XP?   (107 Views)
i'm developing an application under windows using perl 5.8.7 build 813 from ActiveState. i'm calling the filedialog: my @types = ( ["PNG Files", ".png"], ); my $file = $main->getOpenFile(-title => "Open image", -defaultextension=>"png", -filetypes=>\@types); now everything works fine, i ...
Keep getting error message! What does it mean?   (133 Views)
I am just getting started in PerlTk. I keep getting the error message: Can't call method "pack" on an undefined value at (file name)line ... What is this trying to tell me Code follows: my $wCountry = $CountryFrame->Listbox( )->pack(qw/-padx 5 ...
Is it possible to hide a widget which was packed ?   (164 Views)
In article <429b5e5e$1@news.bezeqint.net>, dv@mailtag.com says... > Hi , > > I have a widget which is being built on any case, but is packed (displayed) > only if a certain button is pressed at run-time. > This works great. > ...
Re: Composite Widget Problem   (122 Views)
--- Slaven Rezic wrote: > Add > > $w->ConfigSpecs(-background => ["SELF"]); > > to the Populate method. Heh. I had tried: $w->ConfigSpecs(-bg => ["SELF"]); but that didn't work because -bg is an alias. I also tried: $w->ConfigSpecs(DEFAULT => ["SELF"]); ...
LINUX: getOpenFile filetypes   (155 Views)
Further to my previous post "limiting getOpenFile filetypes" is there anyone running LINUX who can try this script and see if they get a list of ".ps*" and ".eps*", or only ".ps" and ".eps" as the windows seem to ...
Newbie :cget + getting button text on an undetermined number of buttons.   (220 Views)
I have to create an undetermined number of buttons on the fly. When the button is invoked I need to know what the text for that button is. I've looked at 'cget' and am getting a 'Can't call method "cget" ...
Re: Problem with getSaveFile / getOpenFile   (129 Views)
This is a MIME encapsulated multipart message - please use a MIME-compliant e-mail program to open it. Dies ist eine mehrteilige Nachricht im MIME-Format - bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm. --========GMXBoundary229831109750952 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > ...
focusNext and get method   (103 Views)
Is there any workaround to use the 'get' method and 'focusNext' at the same script. In the following simple I need to mark the 'focusNext' to make it work properly. But I need the text to be focused and ...
Right to left writing in text widget   (143 Views)
Hi Everybody, I have a request concerning to typing text right to left in a text widget. I have no idea how to solve this problem. Is there anybody hwo has an answer With the Best: Zsolt -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message ...
Are list mssages getting propagatd to comp.lang.perl.tk?   (153 Views)
For the past few days, I've noticed that messages don't seem to be sent on to the newsgroup. Is this new Rob...
dialogBox without widget reference   (294 Views)
Is it possible to call a dialog box without a widget reference I want to have a standard input box function that I can call from any function without that function having to have a widget passed in and without ...
Socket, cannot get clean results.   (176 Views)
, I am working on an interactive server/client setup, not using INET::Sockets. Everything is gravy except for a little leftover stuff being shown. I type a command w/ args, CLIENT join()s the command with args and sends the newstring,the SERVER ...
get the return status   (206 Views)
hi in unix, i have a program called program_a and i use the system call to invoke it system("program_a"); How do i get the return status of program_a if program_a returns a few status codes...
FAQ 5.21 I still don't get locking. I just want to increment the number in the file. How can I do this?   (603 Views)
This is an excerpt from the latest version perlfaq5.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest ...