Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #22.6K
~1K People Reached
Favorite Forums
Favorite Tags
perl x 9

6 Posted Topics

Member Avatar for Vandithar

[CODE]use strict; use warnings; use 5.010; my @sentences = <DATA>; #reads everything after __DATA__ below my $str = 'control'; my @results = reverse sort by_str_matches @sentences; sub by_str_matches { my @a_matches = $a =~ /$str/g; my @b_matches = $b =~ /$str/g; @a_matches <=> @b_matches; } print for (@results); __DATA__ __DATA__ …

Member Avatar for vapro
0
142
Member Avatar for SergioQ

[QUOTE=SergioQ;1060636]Hi All, So I use Net::POP3 to look into my email server. What I wanted to know is if there is any module that allows me to MODIFY the email messages? Sure between Mail:: and Net::POP3 I can forward them, delete them, etc. But would love to be able to …

Member Avatar for 7stud
0
110
Member Avatar for ravikim

[quote]new() : [code] my $sortscheme = sub { $Sort::External::b <=> $Sort::External::a }; my $sortex = Sort::External->new( mem_threshold => 1024**2 * 16, # default: 1024**2 * 8 (8 MiB) cache_size => 100_000, # default: undef (disabled) sortsub => $sortscheme, # default sort: standard lexical working_dir => $temp_directory, # default: see below …

Member Avatar for 7stud
0
384
Member Avatar for viktorijakup

[QUOTE=k_manimuthu;1043850][CODE] my $FP = 'D:\conv'; my $TP = 'D:\sgml_db'; my $cwd = `cd`; # Get current working directory my ($from_dir, $to_dir) = ($cwd, $cwd); # if your current working directory ($to_dir) doesn't have 'D:\conv' the below line doesn't change the value of $to_dir. # So $to_dir equals to current directory …

Member Avatar for k_manimuthu
0
231
Member Avatar for Vandithar

[QUOTE=Vandithar;1042620]HI, I have a string like this. These are the set of phrases enclosed in double quotes: [code] $str="\"rna binding protein\" OR \"Transcription factor\" "; [/code][/quote] You don't ever need to escape interior quotes in perl. In your case, you could use single quotes as the outer quotes or q{}. …

Member Avatar for 7stud
0
110
Member Avatar for notuserfriendly

[CODE]open(my $INFILE, '<', 'data2.txt'); my (@col1, @col2, @col3); while (<$INFILE>) { next if /^\s*$/ or /^\./; chomp; my @pieces = split /\s+/; push (@col1, shift @pieces) if @pieces == 3; push @col2, $pieces[0]; push @col3, $pieces[1]; } say "@col1"; say "@col2"; say "@col3"; --output:-- BANANAS CHEESE JENNY ARE IS IS …

Member Avatar for 7stud
0
404

The End.