Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: What's vec?

by tachyon (Chancellor)
on May 24, 2001 at 05:07 UTC ( [id://82784]=note: print w/replies, xml ) Need Help??


in reply to What's vec?

vec EXPR, OFFSET, BITS The vec function provides a compact storage of lists of unsigned integers. These integers are packed as tightly as possible within an ordinary perl string. EXPR is treated as a bit string. OFFSET specifies the index of the particular element. BITS specifies how wide each element is in bits. Your JAPH does not run on my system, output: jtjt `jjt``j j`jj ```j`j cheers tachyon

Replies are listed 'Best First'.
Re: Re: What's vec?
by iamcal (Friar) on May 24, 2001 at 11:46 UTC
    The question was rhetorical :p

    Do you have a dbcs? All my JAPH does is reverse the two bit-words of each character.

    Or perhaps your $?, $^F or $| don't default as mine do.

    try this version with hard coded constants:

    #!/usr/bin/perl -w use strict; $_="011291020310415102805081036150812103801030115081"; s/(..)/\\x$1/g;eval"\$_=\"$_\";";print,if($_=join'',map{ chr((vec($_,0,4).vec($_,1,4))+96)}split//)=~s;~; ;g;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://82784]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-07-17 23:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.