Re: hex represenation from string in perl



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 : (

.



Relevant Pages

  • Re: hex represenation from string in perl
    ... I tried reading the FAQ, ... > It is out of frustration and wanting to learn. ... What was wrong with the suggestion John gave you? ...
    (comp.lang.perl.misc)
  • Re: Program compiled on intel acting weired
    ... The data file is open for read but then it gets overwritten by what ... Reading from the standard ... > has special syntax to achieve things like that, ... Wanting to process the output with some other program. ...
    (comp.lang.fortran)
  • Re: Thomas Covenant series
    ... 'liking': they are quite different. ... Similarly I was interested in reading about Princess Diana even though ... wanting to know and understnd their story without ... It won't come as a surprise that I'm in the "can't stand Covenant, ...
    (rec.arts.sf.composition)
  • maybe have a tools list
    ... I was reading the email concerning someone wanting the PT list back. ... buy it or download a solution FREE today! ...
    (Pen-Test)
  • Re: OT: The latest poll regarding the race for President
    ... Meaning, what exactly? ...  You're somehow insulted by my wanting to give ... When I was reading this thread, I read your post to PR and did not ... Just play nice. ...
    (rec.music.beatles)