[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-beginners
Subject: Re: Script for create a file name with Invalid characters in windows
From: Shlomi Fish <shlomif () shlomifish ! org>
Date: 2012-11-02 14:31:45
Message-ID: 20121102163145.21290b17 () lap ! shlomifish ! org
[Download RAW message or body]
Hi Bhanu,
On Fri, 2 Nov 2012 18:49:58 +0530
bhanu chaitanya abbaraju <bhanu.chaitu@gmail.com> wrote:
> Hi All,
>
> Can any one help me, how can we create a file name with invalid characters
> ('?','/') in windows. Generally, Windows OS can not allow to create a file
> name with invalid characters like '?,/' . But, I heard that we can able to
> do with Perl script. If any one know about this please let me know.
I just tried this script on my Windows XP Virtual machine:
[CODE]
#!/usr/bin/perl
use strict;
use warnings;
use autodie;
open my $out, '>', 'foo?hello.txt';
print {$out} "Foobar\n";
close($out);
[/CODE]
It failed with an exception. The same script with the '?' in the filename
replaced by '-' worked fine. Why do you need to create such a filename? Is it
for cracking purposes? If you interested in using funny characters in the keys
of your data, then you should use a database of some sort:
http://perl-begin.org/uses/databases/
(Please reply to the list).
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Parody of "The Fountainhead" - http://shlom.in/towtf
There is an IGLU Cabal, but its only purpose is to deny the existence of an
IGLU Cabal.
— Martha Greenberg
Please reply to list if it's a mailing list post - http://shlom.in/reply .
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic