BOL
Log in
Username or email
Password
Remember me
Register
Lost password
Activity
News
Opportunity
ResearchLabs
Questions
Pages
Discussion
More
BioScripts
Blogs
Bookmarks
Files
Fun
Polls
The Wire
Videos
Our Sponsors
Download
BioinformaticsOnline(BOL) Apps
in your chrome browser.
The Wire
#Tipsoftheday
Wire posts tagged with 'Tipsoftheday'
Rahul Nayak
@rahul
Thread
By
Rahul Nayak
3834 days ago
Search and replace the string 'this' with the string 'that' in the file filename. perl -p -i -e 's/this/that/g' filename
#Perl
#Trick
#PerlOneLiner
#Tipsoftheday
#Replace
#FindandReplace
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
3894 days ago
Print all possible 2 combination of words ( ATGC): $letter = join',','A','T','G','C';
@abc
=glob "{$letter}{$letter}"; foreach (
@abc
) { print "$_\n"; }
#Perl
#PerlTrick
#TipsOftheDay
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4040 days ago
Get line number with Perl $fh->input_line_number()
#Perl
#Tipsoftheday
#Tricks
Shikha Logwani
@shikha
Thread
By
Shikha Logwani
4412 days ago
regex (?(3)foo|fu)bar - Matches foo if 3rd subpattern has matched, fu if not
#Tipsoftheday
#Regex
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4534 days ago
Convert space separated data to tab separated: perl -p -i -e 's/\s+/\t/g' file.txt
#Perl
#Tipsoftheday
#Perlonliner
Abhimanyu Singh
@abhimanyu
Thread
By
Abhimanyu Singh
4540 days ago
To print the matching pattern line perl -ne '/pattern/ && print' infile.gtf
#Perloneliner
#Tipsoftheday
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4551 days ago
To count the number of matches in a string !!! $str = "one.two.three.four"; $n =()= $str =~ /\./gi; print $n;
#Tipsoftheday
#Perl
Poonam Mahapatra
@poonam
Thread
By
Poonam Mahapatra
4573 days ago
Number all lines in a file; perl -pe '$_ = "$. $_"':
#Tipsoftheday
#Perl
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4574 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
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4582 days ago
To round a floating-point value to a certain number of decimal places: $rounded = sprintf("%.2f", $unrounded);
#Tipsoftheday
#Perl
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4586 days ago
To get all the module dependencies for yourScript.pl program. $ scandeps.pl yourScript.pl
#Perl
#Tipsoftheday
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4588 days ago
To check: Does an array has all equal values. if (keys %{{ map {$_, 1}
@test
}} == 1) { # all equal }
#Tipsoftheday
#Perl
Jitendra Narayan
@admin
Thread
1 like
Archana Malhotra
@archana
Archana Malhotra
liked this
4592 days ago
By
Jitendra Narayan
4592 days ago
Write something at the bottom of the file without opening it. perl -p -i -e 'eof && s/$/\nWord/;' <filename>
#Tipsoftheday
#Perloneliner
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4593 days ago
Do you want to compile your Perl program without running it, try $ perl -c <program>
#Tipsoftheday
#Perl
Archana Malhotra
@archana
Thread
By
Archana Malhotra
4621 days ago
print "$^O\n"; To print the OS name in perl
#Tipsoftheday
#Perl
#RegularExpression