Ed Chester wrote:
> Hi again -
>
> Thanks to Chris, Lloyd, $Bill, Dave, Paul and all -
> - this construct does *mostly* what I want:
>
> $MyArray[0] = [ unpack('C*',$buffer) ];
>
> (for completeness, I wasn't having a problem dereferencing; I was checking
> contents of $MyArray with
> Data:
Lloyd Sartor wrote:
I've used ppm and it's great. However, I need to capture the Perl modules
that I've used on a project so the software environment can be recreated
at some later time.
How can I capture Perl packages (on my local machine) that can later be
installed using ppm?
With perl 5.6
The ppm server is just a web directory. U can use wget to dl all the .ppd
files and the tarballs, or just the ones u want. Then u have ur own local
repository that u can use offline. Then cd to that dir and run ppm, then
add it to the repositoy list with rep add local dirname. Dirname can be a
Why do want each element to be a 2 byte WORD? If the original data is in
WORDs then u would import it that way.
read INPUT, $buf, 1024;
@words = $buf =~ m/(..)/g;
or
@{$MyArray[$line]} = $buf =~ m/(..)/g;
Now each element is a 16 bit packed binary value. To turn that into a
number u use unpack.
Julian Brown wrote:
foreach $x_socket (keys %all_connections)
{
$hashref = $all_connections{$x_socket};
$socket = $hashref->{'socket'};
$fn = fileno ($socket);
$fna = fileno ($x_socket);
print "FN ($fn) ($fna)\n";
}
The contents of $socket and $x_socket are identical and are of
Title: Message
one
way is to run 'perl -d', and then enter 'v' as a command
line.
that
will display all modules and revs
eg:
perl
-d -e 'print'
>
v
'Carp.pm' => 'C:/Program Files/MDT
Software/PERL/lib/Carp.pm''Carp/Heavy.pm' => 'C:/Program Files/MDT
Software/PERL/lib/Carp/Heavy.pm''Devel/
I've used ppm and it's great. However, I need to capture the Perl modules that I've used on a project so the software environment can be recreated at some later time.
How can I capture Perl packages (on my local machine) that can later be installed using ppm?
Thanks,
Lloyd
__
I am running ActiveState Perl 5.8.0 on Win2K and Win2K3
This one has totally confused me and I figure it has something to do
with handle references but am not sure.
If I need to I will post all of the code, but for simplicity I am only
posting the relevant portions only.
I do an accept on a lis
> What I still cannot get it to do is extract them as hex words
This I don't understand. The unpacked number is stored in 8 memory bits. Displaying these 8 bits as decimal, hex, or binary is for human convenience. Use printf if you want to display in hex.
Hi again -
Thanks to Chris, Lloyd, $Bill, Dave, Paul and all -
- this construct does *mostly* what I want:
$MyArray[0] = [ unpack('C*',$buffer) ];
(for completeness, I wasn't having a problem dereferencing; I was checking
contents of $MyArray with
Data::Dumper.) 'C*' works great and chucks
perl.org and perl.com along with:
http://www-130.ibm.com/developerworks/linux
has alot of good info on perl.
-Nex6
Ahmed Khater wrote:
Dear list members:
First of all, I am very sorry for the cross-posting of my message and if my
message seems of-topic for some Perl lists to which I
have just sub
Maybe ur having trouble dereferencing the unpacked array. U need to take a
slice out of @MyArray.
$buffer = pack('C*',0x7c,0x45,0x3e,0x02);
$MyArray[0] = [ unpack('C*',$buffer) ];
print $MyArray[0];
print join " ", @{$MyArray[0]};
ARRAY(0x1555220)
124 69 62 2
At 06:39 AM 3/7/05 -0800, Ed C
that's beautiful...thanks
"$Bill Luebkert" <[EMAIL PROTECTED]>
03/07/2005 09:19 AM
To: Lloyd Sartor <[EMAIL PROTECTED]>
cc: perl-win32-users@listserv.ActiveState.com
Subject: Re: eval a file inside a script
Lloyd Sartor wrote:
>
> I
Lloyd Sartor wrote:
Is there an easier or more concise way to eval a script file inside
another script than the following?
open WCFG,'<.\waveform_conf.pl';
@cfg = ;
close WCFG;
eval "@cfg";
Yes, either "do" or "require" are what you need.
do 'waveform_conf.pl';
is probably sufficient for
Lloyd Sartor wrote:
>
> Is there an easier or more concise way to eval a script file inside
> another script than the following?
>
> open WCFG,'<.\waveform_conf.pl';
> @cfg = ;
> close WCFG;
> eval "@cfg";
Have you tried do './waveform_conf.pl';
--
,-/- __ _ _ $Bill Luebker
Is there an easier or more concise way to eval a script file inside another script than the following?
open WCFG,'<.\waveform_conf.pl';
@cfg = ;
close WCFG;
eval "@cfg";
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsu
I think you want to use 'C4' (or 'C*' or whatever) instead of 'H8' to get an array of bytes.
$buffer = pack('C*',0x7c,0x45,0x3e,0x02);
$MyArray[0] = [ unpack('C*',$buffer) ];
"Ed Chester" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
03/07/2005 08:39 AM
To: "Paul
Ed Chester wrote:
>>How about:
>>my @array = unpack ("H8", $buffer);
>>$MyArray[$i] = [EMAIL PROTECTED];
>>Or even:
>>$MyArray[$i] = [ unpack ("H8", $buffer) ];
>
>
> Thanks for the suggestion - you're right, unpack is seeing scalar context.
> Your two ideas are the same, they do indeed assign
> How about:
> my @array = unpack ("H8", $buffer);
> $MyArray[$i] = [EMAIL PROTECTED];
> Or even:
> $MyArray[$i] = [ unpack ("H8", $buffer) ];
Thanks for the suggestion - you're right, unpack is seeing scalar context. Your
two ideas are the same, they do indeed assign the output of pack to a
(1
Might be wrong about this but you're giving unpack a scalar context with
$MyArray[$i];
How about:
my @array = unpack ("H8", $buffer);
$MyArray[$i] = [EMAIL PROTECTED];
Or even:
$MyArray[$i] = [ unpack ("H8", $buffer) ];
?
Paul
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAI
Hello all -
I posted sometime last week about ways of parsing image file data and doing
image processing 'raw' without external software/libraries.
I'm working on this at byte level now and will post the basic code to populate
an array with pixel values when its cleaned up.
Meanwhile, I have
Mike Rabbitt
Hi Chad -
Check this link out -
http://mccammon.ucsd.edu/~ycheng/roberts-perl-tutorial.htm
It was the first tutorial I did many moons ago and it really helped get me up
and running with Perl
HTH
Mike Rabbitt
I.T. Applications Manager
Legal Advice Bureau: 0845-055-050
One of my favorites for beginners is "Perl 5 by Example," which you can find
here: http://affy.blogspot.com/p5be/index.htm
I'd also recommend the O'Reilly books, "Learning Perl" and "Programming
Perl."
Chad Uretsky
Lead Network and Security Engineer
NetIQ Corporation
[EMAIL PROTECTED]
Direct: 71
23 matches
Mail list logo