malware_analysis

# configuring the genes and the virus (some virus share genes)

my token gene {'this is a malware gene'}
my rule virusx {<gene>.*}

# reading the sample line by line from a binary file

for '/script/mysample'.IO.lines -> $line {
        # If the line contains the gene, print it
    if $line ~~ &virusx {say "Genes from virus X were found: "; say $line; }

}

See Also

array-contains-a-value.raku

Determine whether an array contains a value

bottles.raku

99 bottles of beer

combinations.raku

Combinations

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.