Home: Perl Programming Help: Advanced:
File Question



KaoAtlantis
Novice

Jan 14, 2001, 12:08 AM


Views: 1823
File Question

Sorry for posting this again... I posted on the intermediate but diddnt get much luck... I also tried to explane more in this one:

I have been trying to create user accounts in perl, But I want to have a seprate file for every user.. Unfortunatly, Users have odd charactors in their names (I cant change this, I would affect too many people), Like | / or \ sometimes even a Question mark... Basicly they have access to charactors Windows(I will eventualy put this software on my Linux Machine) donesn't allow in filenames...

I was wondering if there was a way to get Perl to place the filenames with HEX Charactors(Or Binary), Instead of normal charactors, But also convert the user input into hex, so it can open the file when the user sends a command...

I would prefer if it worked so only the odd charactors were displayed hex(or bin), but I wouldnt mind if the whole file was...

-Thanks for you help(again :p), Kao



Kanji
User / Moderator

Jan 14, 2001, 2:29 PM


Views: 1818
Re: File Question

Sounds like you want URI::Escape ... or a modified version of its functionality.