Re: hex represenation from string in perl
- From: "archilleswaterland@xxxxxxxxxxx" <archilleswaterland@xxxxxxxxxxx>
- Date: 6 Sep 2005 11:05:07 -0700
hi,
I am sorry. I tried reading the FAQ, too cryptic. I am not writing here
out of laziness and wanting a direct answer.
It is out of frustration and wanting to learn. I looked at a lot of
documentation - pack, unpack, int, hex ... perldoc -f ...
#!usr/bin/perl -w
use strict;
my @file;
my $v;
my $i;
open(FILE,"< values") or die "cannot open file for reading: $!";
@file = <FILE>;
close (FILE) or die "an error occured while trying to close the file:
$!";
print ("@file");
print ("\n");
foreach $v (@file){
chomp($v);
printf ("%0.4x ",$v);
}
it shoudn't be hard at all write, I am reading in a string/variable
1111 and I want to print out f
this still doesn't work : (
.
- Follow-Ups:
- Re: hex represenation from string in perl
- From: A. Sinan Unur
- Re: hex represenation from string in perl
- From: A. Sinan Unur
- Re: hex represenation from string in perl
- From: Paul Lalli
- Re: hex represenation from string in perl
- From: Jim Gibson
- Re: hex represenation from string in perl
- References:
- hex represenation from string in perl
- From: archilleswaterland@xxxxxxxxxxx
- Re: hex represenation from string in perl
- From: John W. Krahn
- hex represenation from string in perl
- Prev by Date: Re: Prototype mismatch under ModPerl::PerlRun
- Next by Date: Re: Prototype mismatch under ModPerl::PerlRun
- Previous by thread: Re: hex represenation from string in perl
- Next by thread: Re: hex represenation from string in perl
- Index(es):
Relevant Pages
|