Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

The Monastery Gates

( #131=superdoc: print w/replies, xml ) Need Help??

Donations gladly accepted

If you're new here please read PerlMonks FAQ
and Create a new user.

New Questions
Print text on the same line after match
4 direct replies — Read more / Contribute
by periodicalcoder
on Dec 14, 2018 at 15:16
    Hello all, it has been a while for me. You were all a huge help with my last project.

    This is actually a follow-up of that same project, and while I feel that this should be simple I cannot find (or don't know enough to adapt) a solution online. I have a text file with a line (there will only ever be a single line that matches) like this:

    N1*PE*COMPANY NAME INC*XX*123456~

    **edit: on Windows using Strawberry Perl with a .pl script** I need to extract the number at the end of this line, excluding the tilde, and add it to a variable so that $number = 123456. So far I have only been able to come up with the match regex, but I'm not sure how to get the text at the end. So far I have this which gives the entire line:

    perl -ne "print if /INC\*XX\*/" cr835.txt

    Inside my perl script I assume that I will use something like this, but of course including any recommended code changes:

    my $number = "perl -ne "print if /INC\*XX\*/" cr835.txt";

    My end goal is to detect this number and use it to rename the file. I already have the code tested for renaming the file with a timestamp and I just need help populating this variable.

    Thanks a bunch!

    peridicalcoder

regex: help for improvement
3 direct replies — Read more / Contribute
by frazap
on Dec 14, 2018 at 02:45
    I have names all composed of ascii characters, that I need to uniformize:
    • remove non letter (',.)
    • replace "-" by a space
    • start each word with an upper case
    • break camel case word: dosSantos -> Dos Santos

    I came with the code below that seems to work (as far as I can test it).

    My questions: how could I improved it ? (I think it will break if with unicode characters, what changes should I made to get it work with any character set ?)

    Thanks

    François

    use strict; use warnings; while ( my $t = <DATA> ) { chomp $t; printf "orig: %-30s translated: %s\n", $t, translate($t); } sub translate { my $str = shift; $str =~ tr/-/ /; #replace - with a space $str =~ tr/a-zA-Z/ /cs; #replace non letter with a space my @words = split( /\s+/, $str ); foreach my $w (@words) { #insert a space when a upper case is inside a word if ( $w =~ /\p{isLower}\p{isUpper}/ ) { my @all; while ( $w =~ m/\G(\p{isUpper}*\p{isLower}+)/g ) { push @all, $1; } $w = join( " ", @all ); } else { $w = ucfirst( lc($w) ); # we are using side effect of fore +ach loop } } return join( ' ', @words ); } __DATA__ Acierno James S., Jr. Acierno James, Jr. Ackermann-Hirschi L. Agatonovic-Jovini T. Alba-Castro Jose-Luis Alconada Verzini M. J. AlconadaVerzini M. J. Alvarez Fernandez A. Alvarez-Bolado Gonzalo Alvarez-Gonzalez B. AlvarezGonzalez B. AlvarezPiqueras D Amor Dos Santos S. P. Amor DosSantos S. P. AmorDosSantos S. P da Costa F. Barreiro Guimaraes Dano Hoffmann M. DanoHoffmann M. Dell' Acqua A. Dell' Asta L. Dell'Acqua A. Dell'Asta L. Dell'Omo Giacomo della Volp D. della Volpe D. Della Volpe D. DeRegie J. B. De Vivie Derendarz D. deRenstrom P. A. Bruckman Dupl'akova Nikoleta Duplakova Nikoleta Faucci Giannelli M. Fauccigiannelli M. FaucciGiannelli M. Yusuff I. Yusuff' I. Yao W-M Yao W-M. Yao W. -M Yao W. -M.
Mojolicious global variable
1 direct reply — Read more / Contribute
by bartrad
on Dec 13, 2018 at 14:53

    Evening monks, I'm after some of your wisdom.

    I have a Mojolicious lite app that works as I would expect for a single user. However, if two users are accessing it at the same time, the value of $router is changing depending on who submitted the request last.

    For example, if user A submits the form to query 'RouterA' then the information is displayed for that router. However, when user B then submits the form to query 'RouterB', the session for user A and user B displays the information for 'RouterB'. I figure it must be since I am declaring $router (and other things) globally but I'm not sure how to store this and pass it around the different routes I have...

    my ( $router, $cfg, $ip ); get '/' => sub { my $c = shift; $c->render( template => 'index' ); }; post '/' => sub { my $c = shift; ($router) = $c->param('router'); app->log->info("Router $router"); $cfg = get_config($router); $ip = $cfg->get_ip(); $c->render( template => 'result', router => $router, ip => $ip, ); } => 'index'; get '/info' => sub { my $c = shift; $c->render( template => 'result', router => $router, ip => $ip, ); }; get '/cards' => sub { my $c = shift; my %cards = $cfg->get_cards(); $c->render( template => 'cards', router => $router, cards => \%cards + ); }; app->start;

    The reason I have globally declared the variables is so I can pass them between the different routes and have the value of $router preserved and displayed on each resultant HTML page. Any help greatly appreciated as I'm scratching my head with this one!

Net::SSH::Perl and Net::SSH::Perl::Agent
2 direct replies — Read more / Contribute
by arc444
on Dec 13, 2018 at 14:16

    Hi. Can anyone advise how I can get my Net::SSH::Perl object to use a particular key I have identified in my Net::SSH::Perl::Agent object ?

    I have deliberatley simplified down - I will actually iterate over all available keys until I find the one I want ( based on 'comment' ) and then wish to use that particular key

    Im unable to try all keys as my target host only allows a few attempts, and I have many keys loaded into the agent ( reducing these available keys is not an option )

    Many Thanks !

    # Ensure the invoking process has a valid ssh-agent running, and is lo +aded with an appropriate key, or keys use warnings; use strict; use Net::SSH::Perl::Key; use Net::SSH::Perl::Agent; my $agent = Net::SSH::Perl::Agent->new(2); my ($key, $comment) = $agent->first_identity; use Net::SSH::Perl; my $ssh_user = 'myuser'; my $ssh_host = 'myhost'; ## How to use the above referenced $key in the following ssh connectio +n ?? ## my %ssh_params = ( debug => '1', options => [ "StrictHostKeyChecking n +o", "UserKnownHostsFile /dev/null" ] ); my $ssh = Net::SSH::Perl->new( $ssh_host, %ssh_params ); my $result = $ssh->login("$ssh_user"); if ( $result ) { print "Logged in as ${ssh_user} on host ${ssh_host}\n"; } else { print "Failed to login in as ${ssh_user} on host ${ssh_host}\n"; }
Perl launching process
6 direct replies — Read more / Contribute
by pwagyi
on Dec 13, 2018 at 05:17

    Greeting monks! I have been using perl system, backtick for some time to invoke other executables. But then I came across IPC::Cmd run, run_forked, I realize that it's somewhat better in a sense that I can easily access stdout, stderr and also exit code. So the question is when is it appropriate to use each system, backtick, or other modules? Is there best practice?

Killer byte tripping up Perl?
4 direct replies — Read more / Contribute
by echo5
on Dec 12, 2018 at 17:22

    I have a simple script that appears to show that some byte in the output is causing Perl to behave strangely.

    The script calls a command that coughs up 150 bytes or so of binary data. One stream of returned data behaves as expected. Another stream causes chaos.

    The script: $cmd = "/usr/local/bin/mycmd"; print "The cmd to be run is: $cmd \n"; open(CMD, "$cmd |" ) or die "Can't run '$cmd'\n$!\n"; while (<CMD>) { chomp; print "My raw output is: $_ \n"; $dataout = $_; print "My DATAOUT is: $dataout \n"; }

    When I run the above script in a "good" scenario I get the below output:

    The cmd to be run is: /usr/local/bin/mycmd My raw output is: &#65533; ` /11&#65533;%_$&#65533;%f$&#65533;&c$&#65 +533;%a$&#65533;%\$&c$&^$&#65533;&i$ My DATAOUT is: &#65533; ` /11&#65533;%_$&#65533;%f$&#65533;&c$&#65533; +%a$&#65533;%\$&c$&^$&#65533;&i$

    When I run the above script in a "bad" scenario I get the below output:

    The cmd to be run is: /usr/local/bin/mycmd My raw output is: My DATAOUT is: My raw output is: &#65533;0]&#65533;c &#65533;&#65533; My DATAOUT is: &#65533;0]&#65533;c &#65533;&#65533;

    Ultimately the goal is to ingest the data and process it using unpack but that was failing as $_ didn't contain data is should contain to process. The "bad" behavior above seems to show that there is some sort of "killer byte" being output from mycmd that throws a wrench into things. Below is the good and bad output in hex form via xxd. Is there a byte in there tripping up Perl?

    Good data stream: 0000000: 0202 00d0 0000 0000 0000 0000 0100 0000 ................ 0000010: 0100 0000 0100 0000 0100 0000 0100 0000 ................ 0000020: 0100 0000 0100 0000 0500 0000 0500 0000 ................ 0000030: 0500 0000 0500 0000 0500 0020 0100 0000 ........... .... 0000040: 0100 0000 0100 0000 0100 0000 0100 0000 ................ 0000050: 0100 0000 0100 0000 0500 0000 0500 0000 ................ 0000060: 0500 0000 0100 0000 0100 0000 0000 0000 ................ 0000070: 0200 0060 0100 0020 0000 0000 0100 2d00 ...`... ......-. 0000080: 0100 2f00 0100 3000 0000 0000 0100 0000 ../...0......... 0000090: 0000 0000 0102 ca25 0102 4a24 0102 bd25 .......%..J$...% 00000a0: 0102 5024 0102 da25 0102 4c24 0102 d525 ..P$...%..L$...% 00000b0: 0102 4c24 0102 c325 0102 4624 0102 e025 ..L$...%..F$...% 00000c0: 0102 4e24 0102 e225 0102 4824 0102 dd25 ..N$...%..H$...% 00000d0: 0102 5224 ..R$
    Bad data stream: 0000000: 020a 009c 0000 0000 0000 0000 0100 0000 ................ 0000010: 0100 0000 0100 0000 0100 0000 0100 0000 ................ 0000020: 0100 0000 0100 0000 0100 0000 0500 0000 ................ 0000030: 0500 0000 0500 0000 0500 0000 0500 0000 ................ 0000040: 0500 0000 0500 0000 0500 0000 0500 0000 ................ 0000050: 0500 0000 0500 0000 0500 0000 0500 0000 ................ 0000060: 0500 0000 0500 0000 0100 0000 0000 0000 ................ 0000070: 0100 3000 0000 0000 0100 005c 0100 00b4 ..0........\.... 0000080: 0000 0000 0100 0000 0000 0000 0200 0063 ...............c 0000090: 0100 0020 0000 0000 0103 9206 0103 8506 ... ............
Grep Pattern
3 direct replies — Read more / Contribute
by GotToBTru
on Dec 12, 2018 at 09:29

    I want to apply a F T T F repeating pattern as a filter to an array or list. Here is what I came up with:

    $i = 0; @result = grep { $i = 0 unless ($i<4); $i++%3 ? 1 : 0; } 0..12

    @result = 1,2,5,6,9,10

    It works but looks clunky. Any more elegant options?

    But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

Calling a variable value as a variable
4 direct replies — Read more / Contribute
by echo5
on Dec 11, 2018 at 19:42

    Greetings Monks, long time listener.....first time caller

    I am attempting to accomplish something that I'm sure is probably dumb but I'm a hack (I admit it freely) and trying to deal with some ingested binary data in a way that makes sense in my brain (likely root of problem). I am ingesting binary output to stdout from a command run previous to the below code. Everything works as expected in the below code EXCEPT when I need to compare the value of previously defined variable (eg: $blu) by calling it in a foreach later where the string "blu" is an element and I try to call $blu by calling its element value in the foreach loop ${"index"} when $index equals blu, red, etc.

    No matter what I try...${index}, ${'index'}, ${"index"} I can never draw in the value of $blu, $red, $grn or $ylw to evaluate whether or not it equals the value 01.

    Thanks to all who take a moment to consider my quandary. Like I said I'm a hack and I'm beating my head against the desk.

    { chomp; my $dataout = $_; my @bytes = unpack( 'x252' . 'H2' x200, $dataout); my ($blu, $red, $grn, $ylw) = (@bytes[0], @bytes[12], @by +tes[56], @bytes[120]); my %humanize = ( 'blu' => 'Blue', 'red' => 'Red', 'grn' => 'Green', 'ylw' => 'Yellow' ); foreach my $index (blu, red, grn, ylw) { if (${"index"} != 01) { syslog('warning', "Color val +ue bad $humanize{$index}"); $status_code = 1; } } }
EXTERN.h missing when compiling on OpenWrt
3 direct replies — Read more / Contribute
by morgon
on Dec 11, 2018 at 18:37
    Hi

    I would like to run a bot on my OpenWrt-device where I do not have a full perl-installation (there is no working working CPAN-client).
    I have copied over all pure-perl modules I need but for the xs-modules I had hoped that I could make do with what I can get via package-manager.

    Alas there is one vital ingredient missing, and that is Net::SSLeay that is not available (as an aside - ssl modules for python are packaged...).
    So I installed gcc and tried to compile it on the box, but it fails like this:

    $ make Running Mkbootstrap for Net::SSLeay () chmod 644 SSLeay.bs mips-openwrt-linux-uclibc-gcc -c -D_REENTRANT -D_GNU_SOURCE -Os -pip +e -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour +-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -m +soft-float -I/data3/openwrt-cc-ar71xx/staging_dir/target-mips_34kc_uC +libc-0.9.33.2/usr/include -I/data3/openwrt-cc-ar71xx/staging_dir/targ +et-mips_34kc_uClibc-0.9.33.2/include -I/data3/openwrt-cc-ar71xx/stagi +ng_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include + -I/data3/openwrt-cc-ar71xx/staging_dir/toolchain-mips_34kc_gcc-4.8-l +inaro_uClibc-0.9.33.2/include -O2 -DVERSION=\"1.84\" -DXS_VERSION=\ +"1.84\" -fPIC "-I/usr/lib/perl5/5.20/CORE" SSLeay.c SSLeay.xs:140:20: fatal error: EXTERN.h: No such file or directory #include "EXTERN.h" ^ compilation terminated. make: *** [SSLeay.o] Error 1
    Any ideas on how to proceed?

    My system is an OpenWrt Chaos Calmer 15.05, the perl is a 5.20.2.

    Many thanks!

replace characters in link
2 direct replies — Read more / Contribute
by ytjPerl
on Dec 11, 2018 at 10:28
    Hi Monks,

    I basically know how to replace partial of string with designated characters. But I have trouble with the string containing special characters which pass to perl variable and which I only keep it as it is in perl. For instance, I have a web link as https://abc.abc:8080/abc?abcdef&abc=&egh?, I am intending to replace abc.abc:8080 as def.def and keep the rest of it as it is, so the link would be https://def.def/abc?abcdef&abc=&egh?

    Is there a way to do it ?

    Thanks!

How does rename() work on read-only files?
4 direct replies — Read more / Contribute
by j41r
on Dec 10, 2018 at 19:56

    Dear monks,

    I'm one of the weird people that hates to ask questions but instead loves to RTFM. This time I'm really stuck with this subject that I'm pretty sure is trivial for all of you but, for me, it's so important that I didn't hesitate to raise my hand to ask about it, so here you go:

    I was reading about Why does Perl let me delete read only files? Why does i clobber protected files? Isn't this a bug in Perl?, and while the executive summary was pretty much understandable, that wasn't enough for me and I went the extra mile by reading the elaborately and painstakingly explanation available in the file file-dir-perms

    That's an amazing explanation, however how rename() actually works on read-only files just went over my head. Could anyone please help me out understand these two cases?

    1. When running perl -i.bak -pe 1 alpha/foo, foo's inode is preserved and foo.bak gets a new inode.
    2. When running perl -i.bak -pe 1 alpha/bar, bar gets a new inode and bar.bak gets the previous bar's inode.

    I also read How can I reliably rename a file?, which says (emphasis mine):

    It may be more portable to use the File::Copy module instead. You just copy to the new file to the new name (checking return values), then delete the old one. This isn't really the same semantically as a rename(), which preserves meta-information like permissions, timestamps, inode info, etc.

    but it seams to just add insult to injury, so any help would be appreciated.

multiple hash compare, find, create
9 direct replies — Read more / Contribute
by Anonymous Monk
on Dec 10, 2018 at 12:12

    Hello Perl Monks. First time post, long time gleaner of information which is and has been very appreciated. Anyway I have an issue that I truly need some assistance with. I am fairly new to hash tables. What I need to do is compare three hash tables each containing between 14 million and 28 million keys with associated values. Sure, I could nest some loops and let it rip and come back in a year or so to see if it worked and hoping that no server crashes occurred.

    Optimally, I'd like to find the common keys between each of the three hash tables and gather the values from each of the three hash tables and create a new, forth hash table that contains  key => [value_hash_1, value_hash_2, value_hash_3] And for a key that does not exist in all three hashes, do nothing; the resulting forth hash table will have somewhat less than 14 million k/v pairs.

    Do I make sense? And the solution is most likely posted, but I had difficulty finding it.

    Thank you very much for your assistance!

New Meditations
RFC: Set::Select: get intersection or union of sets; or more generally, the set of elements that are in one or more input sets
1 direct reply — Read more / Contribute
by kikuchiyo
on Dec 12, 2018 at 16:58

    If we have two sets, it is considered a solved problem to get their union or intersection or symmetric difference, there is even an entry in perlfaq4 about it. The situation is slightly more complicated if we have more than two input sets, because then it's a valid question to ask to e.g. get the set of elements that are in the first or second set but not in the third and fourth etc. The number of combinations grows rapidly with the number of input sets, and just writing ad hoc solutions to each little problem becomes infeasible. So a more general solution is needed - the hard part is designing the user interface so that it is able to express all the possible combinations of selections in a general and flexible, yet efficient and understandable manner. A cursory search of CPAN brought up several (abandoned?) modules in the Set::* namespace, but none of them was exactly what I needed.

    I have the outline of an attempted solution. It's an OO module that has a constructor to which the input sets can be fed, and one method called select, which accepts a selector string argument and emits (an arrayref of) the elements that match the selector. If we have 3 input sets, then the '110' selector string selects all elements that are in the first and second sets but not in the third.

    #!/usr/bin/perl { package Set::Select; use strict; use warnings; sub new { my ($class, $args, @sets) = @_; my $attr; $attr = $args->{key} if (ref $args eq 'HASH' and exists $args->{ke +y}); my $self; for my $i (0..$#sets) { for my $elem (@{$sets[$i]}) { my $key = defined $attr && ref $elem eq 'HASH' ? $elem->{$ +attr} : $elem; $self->{$key}->[1] //= $elem; $self->{$key}->[0] //= '0' x @sets; vec($self->{$key}->[0], $i, 8) = 0x31; } } bless $self, $class; } sub select { my ($self, $bits) = @_; return [map { $self->{$_}->[1] } grep { $self->{$_}->[0] =~ $bits +} keys %$self]; } } package main; use strict; use warnings; use Data::Dumper; my $x = Set::Select->new({}, [1, 3, 5, 7], [2, 3, 6, 7], [4, 5, 6, 7]) +; print Dumper $x->select($_) for qw/100 101 111 10. ... /; my $y = Set::Select->new({key => 'id' }, [{id => 1, value => 1}, {id => 3, value => 1}, {id => 5, value => +1}, {id => 7, value => 1}], [{id => 2, value => 2}, {id => 3, value => 2}, {id => 6, value => +2}, {id => 7, value => 2}], [{id => 4, value => 3}, {id => 5, value => 3}, {id => 6, value => +3}, {id => 7, value => 3}], ); print Dumper $y->select($_) for qw/100 101 111 10. ... /;

    A Venn diagram that may or may not make the intent clearer:

             .---.
            /  1  \
           |       |
        .--+--. .--+--.
       /   | 3 X 5 |   \
      |    |  / \  |    |
      |  2  \/ 7 \/  4  |
      |     |`---'|     |
      |      \ 6 /      |
       \      \ /      /
        `------^------'
    

    I think these selector strings as the primary (and only) user interface are better than the possible alternatives that come to mind: a verbose, ad hoc query language would have to be explained at length in the documention, tested carefully in the source, and parsed painfully at runtime, while a forest of arbitrarily named methods to select this or that subset would bloat the code needlessly and make it harder to use.

    Using regular expressions opens the door to abuse, but it also allows convenient and terse selector strings, makes the implementation efficient, and it's something people already know.

    If the elements are hashrefs (representing a record or object or something), there is a mode to use not the elements themselves but a named key inside them as the basis of selection, as the second example shows. This mode can be considered buggy as it is now, because only one version of a record with the same key is stored (in the example, some values are discarded. I don't have a good solution for this problem yet, partly because it would make the implementation slower and more complicated, partly because I don't know what would be the right thing to do.

    Questions:

    • Is this useful to anyone?
    • How to make it better?
    • What would be a good name if this were to become a module? I've tentatively chosen Set::Select but it may be too generic.
Camel vs. Gopher
4 direct replies — Read more / Contribute
by reisinge
on Dec 08, 2018 at 14:16

    I've been using Perl for several years mostly for small to medium sized programs of sysadmim type (automation, gluing, data transformation, log searching). Recently I started to learn Go. I wanted to write something in both languages and compare. Here goes.

    The Perl code is more than 2 times smaller:

    $ ls -l x.* | perl -lanE 'say "$F[8]\t$F[4] bytes"' x.go 694 bytes x.pl 294 bytes

    Perl code is more than 4 times slower when run ...

    $ time go run x.go > /dev/null real 0m1.222s user 0m1.097s sys 0m0.220s $ time perl x.pl > /dev/null real 0m5.358s user 0m4.778s sys 0m0.497s

    ... and more than 5 times slower when I built the Go code:

    $ go build x.go $ time ./x > /dev/null real 0m0.947s user 0m0.890s sys 0m0.126s

    The code generates 10 million random integers from 0 to 9. Than it counts the occurrence of each generated integer and prints it.

    $ cat x.go package main import ( "fmt" "math/rand" "time" ) func main() { // Seed the random number generator seed := rand.NewSource(time.Now().UnixNano()) r1 := rand.New(seed) // Generate random integers var ints []int for i := 0; i < 10000000; i++ { n := r1.Intn(10) ints = append(ints, n) } // Count ints occurrence count := make(map[int]int) for _, n := range ints { count[n]++ } // Sort ints var intsSorted []int for n := range count { intsSorted = append(intsSorted, n) } // Print out ints occurrence for n := range intsSorted { fmt.Printf("%d\t%d\n", n, count[n]) } } $ cat x.pl #!/usr/bin/perl use warnings; use strict; # Generate random integers my @ints; push @ints, int rand 10 for 1 .. 10_000_000; # Count ints occurrence my %count; $count{$_}++ for @ints; # Print out ints occurrence for my $int ( sort keys %count ) { printf "%d\t%d\n", $int, $count{$int}; }

    In conclusion I must say that I like both languages. I like beer too :-).

    Always rewrite your code from scratch, prefefably twice. -- Tom Christiansen
New Obfuscated Code
VT100 Screensaver
1 direct reply — Read more / Contribute
by kschwab
on Dec 09, 2018 at 16:27

    Only works on Unix like machines...requires a VT100 compatible terminal like an xterm, and a working "stty" binary. Handles resizing the window while it's running. Ctrl-C to stop it.

    #!/usr/bin/perl use warnings;use strict;my($r,$c);$|=1;init(); sub init{print "\ec";($r,$c)=split' ',qx"stty size";$r-=5;$c-=16}; $SIG{INT}= sub{print "\ec\n";exit};$SIG{WINCH}=sub{init()}; $_='!X!E!EIC%IC%IC%!X!ECu#kCD@3ilowg!E!WICD@biloQgIO#kAr@DiloT@/@j'. '@D@j@%IO#myD@gg!QCu#kC%IO#kO#gO#gC%!MIC%!QCu#kC%IO#ne#me#ni%!MICD'. '@f@/iloQK';s/!/4pa/g;s/@/ilp/g;s/#/KW/g;s/%/Ag/g;tr|A-Za-z0-9+/| -_|; @_=split(/\n/,unpack('u',join($',map(chr(32+length($_)*3/4). $_,/(.{1,60})/gs))));print "\ec\e[2J\e[?25l";srand(); for (;;) { my($x,$y)= map{int(rand($_))+1}($c,$r); for(0..4){print "\e[".($y+$_).";${x}H".$_[$_];} select($\,$\,$\,rand(1.2)+.3); for(0..4){print "\e[".($y+$_).";${x}H"." "x16;} }
Christmas Package Obfuscation
1 direct reply — Read more / Contribute
by kschwab
on Dec 08, 2018 at 14:11
    #!/usr/bin/perl $;;$^;s#^#$\ _-~,..___ .-' .--._ ```--.-----.___ ._^---- (`-...`-. _/,----. ) ````---=. _.-'' ````-- `.___.-.) (---=='' .-' | _.-' _.-. )(`.-._``--.._ .' | |`---..__ .-'.-'.' )| |_ ``--...`. | | ``--.._ ,'.-' ( ( `-.`-. .'| : | | | | --.._`. ) `. `. | : | | | | ( )-.._.') ) ) : | | | | | | | ( ( ) : | | | | (_( | ) ) | : .' | | | | L/ | : .' (__ | | | | :.' `-.._ | | | | : `-.._ | | | |/ `--`_|_ | .' `._ | .' ``-.__ | .' `--`; # and "Happy Holidays" or Merry Christmas! print "Is print broken?\n";print;# guess not?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2018-12-15 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (69 votes). Check out past polls.

    Notices?