Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
General
:
Perl Programming
:
characters
Previous Thread
Next Thread
Print Thread
View Threaded
Feb 17, 2000, 1:28 AM
clearfox
Novice
(36 posts)
Feb 17, 2000, 1:28 AM
Post #1 of 2
Views: 2023
Shortcut
characters
Is there a way to read the first to characters of a key in a hash for later procesing?
ex:
$scalar = first2char ($hash{'key'};
open (FILE, "$scalar.txt");
perlkid
Feb 17, 2000, 10:59 AM
clearfox
Novice
(36 posts)
Feb 17, 2000, 10:59 AM
Post #2 of 2
Views: 1921
Shortcut
Re: characters
In reply to
Ok, sorry guys,
I figured this one out two. If anyone wants to know what i did here it is;
Code:
$zip_where = "$in{'zipcode'}";
$what_zip_code = substr $zip_where, 0, 2;
$zip_code2 = "/c16/olbis/cgi-bin/zipcodes/$what_zip_code.txt";
perlkid
Previous Thread
Next Thread
Print Thread
View Threaded