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
Groups
Polls
The Wire
Tryst
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
3347 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
3406 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
3553 days ago
Get line number with Perl $fh->input_line_number()
#Perl
#Tipsoftheday
#Tricks
Shikha Logwani
@shikha
Thread
By
Shikha Logwani
3925 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
4047 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
4053 days ago
To print the matching pattern line perl -ne '/pattern/ && print' infile.gtf
#Perloneliner
#Tipsoftheday
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4063 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
4086 days ago
Number all lines in a file; perl -pe '$_ = "$. $_"':
#Tipsoftheday
#Perl
Jitendra Narayan
@admin
Thread
By
Jitendra Narayan
4086 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
4094 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
4099 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
4100 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
By
Jitendra Narayan
4104 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
4105 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
4134 days ago
print "$^O\n"; To print the OS name in perl
#Tipsoftheday
#Perl
#RegularExpression