No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi! I split lines on tabs (fields). I would like Perl to print first filed in parenthesis. My script is the following: open (INP, "input.txt") or die "Can't open input: $!\n"; open (OUT, ">>output.txt") or die "Can't open output: $!\n"; while ($line = <INP>) { chomp ($line); @field = split … |
|
Hello! Does somebody know how to print the following fields from these lines chr1 166851489 166851564 chr1 166851665 166851740 so that Perl prints only: chr1 166851489 166851740 All fields are tab-separated. Thank you. /Rob |
|
Hello! I would like to know how can I tell to count the number of -| (minus followed by a pipe with no space) expressions in one line using grep in a given file. I tried grep /\-|\ |/ | filename wc -l but this does not seem to work … |
|
Hello there! I wrote this code that performs removal of certain sequences, but its execution time exceeds one hour on a supercomputer. Could you help me to simplify it, so it will consume less time? Big thanks! /Robert #!/usr/local/bin/perl -w open (INPUT, "phastCons_200_chr6.txt") and print "phastCons is open\n"; open (OUT, … |