Results for "Tipsoftheday"


  • Do you want to compile your Perl program without running it, try $ perl -c <program> #Tipsoftheday #Perl

    Tags: Tipsoftheday, Perl

    1533 days ago

  • print "$^O\n"; To print the OS name in perl #Tipsoftheday #Perl #RegularExpression

    Tags: Tipsoftheday, Perl, RegularExpression

    1561 days ago

  • Write something at the bottom of the file without opening it. perl -p -i -e 'eof && s/$/\nWord/;' <filename> #Tipsoftheday #Perloneliner

    Tags: Tipsoftheday, Perloneliner

    1532 days ago

  • Generate N base genome: perl -e '@b=qw/A T G C/;print ">Genome\n";while($l<N){print @b[int(rand(4))];$l++;}' #Tipsoftheday #Perl

    Tags: Tipsoftheday, Perl

    1514 days ago

  • To check: Does an array has all equal values. if (keys %{{ map {$_, 1} @test }} == 1) { # all equal } #Tipsoftheday #Perl

    Tags: Tipsoftheday, Perl

    1528 days ago

  • Number all lines in a file; perl -pe '$_ = "$. $_"': #Tipsoftheday #Perl

    Tags: Tipsoftheday, Perl

    1513 days ago

  • To get all the module dependencies for program. $ #Perl #Tipsoftheday

    Tags: Perl, Tipsoftheday

    1526 days ago

  • To round a floating-point value to a certain number of decimal places: $rounded = sprintf("%.2f", $unrounded); #Tipsoftheday #Perl

    Tags: Tipsoftheday, Perl

    1522 days ago

  • To count the number of matches in a string !!! $str = "one.two.three.four"; $n =()= $str =~ /\./gi; print $n; #Tipsoftheday #Perl

    Tags: Tipsoftheday, Perl

    1491 days ago

  • To print the matching pattern line perl -ne '/pattern/ && print' infile.gtf #Perloneliner #Tipsoftheday

    Tags: Perloneliner, Tipsoftheday

    1480 days ago