We have a c source file: something.c
int xmode(char** str)
{
(*str)[0] = 'X';
(*str) ++; // xmode modified *str
return 0;
}
# some comment .... | |
EN -> value1 | |
CN -> value2 | |
EN -> value3 | |
CN -> value4 | |
-------------------above is inputfile content | |
###sample code | |
my $pattern = "value1"; | |
my @lines = "inputfile".IO.lines; |
#!/usr/bin/perl6 | |
use JSON::Fast; | |
use Inline::Perl5; | |
#`{ | |
{ | |
"user-list":[ | |
"xxx" | |
], |
We have a c source file: something.c
int xmode(char** str)
{
(*str)[0] = 'X';
(*str) ++; // xmode modified *str
return 0;
}
#!/usr/bin/env perl6 | |
class SliceThing { | |
has $.f; | |
has $.t; | |
} | |
sub infix:<<':'>>(Int $f, Int $t) { | |
return SliceThing.new(f => $f, t => $t); | |
} |
c code, compiler to libgetint.so : | |
#include <stdio.h> | |
int getint() | |
{ | |
return 42; | |
} | |
int setint(int* ptr, int(*get)()) | |
{ |
new output: | |
Level 0 elems: 5 | |
star => | |
Level 1 elems: 6 | |
core => NQPMu | |
name => Str|rakudostar | |
star => Str|rakudostar-0.7-x86_64 | |
tag => NQPMu | |
form => NQPMu |
#!/usr/bin/env perl6 | |
use v6; | |
# not support innser html in paragraph | |
# not support single-tag like <x> | |
# the test source https://docs.perl6.org/language.html, without not support part | |
grammar HTML { | |
rule TOP { | |
<html> |
127.0.0.1 dp.559.cc | |
127.0.0.1 1.yhzm.cc | |
127.0.0.1 sta.jcjk0451.com | |
127.0.0.1 www.716703.com | |
127.0.0.1 www.hao934.com | |
127.0.0.1 p.kjwx8.com | |
127.0.0.1 pdl.gionee.com | |
127.0.0.1 ads.gionee.com | |
127.0.0.1 info.yitsoftware.com | |
127.0.0.1 www.1680go.com |
#!/usr/bin/env perl6 | |
class Spawn { | |
has &.cb; | |
has @.args; | |
has $.name; | |
has $.in = Channel.new; | |
method receive() { | |
return $!in.receive; |
#!/usr/bin/env perl6 | |
our $process-id-counter = 0; | |
class Process::Async { | |
has $.id; | |
has $.executable; | |
has @.args; | |
has $.program; | |
has @.flag; |