Page MenuHomeHEPForge

analyse
No OneTemporary

#!/usr/bin/perl
open INPUT,'<quarkonii.file';
$nobs=0;
while ($line=<INPUT>){
chomp $line;
@line = split /\t+/,$line;
$exp = $line[0];
$obs = $line[4];
if($nobs==0){
$nobs=1;
$obs[$nobs]=$obs;
$nexp[$nobs]=1;
$exp[$nobs][$nexp[$nobs]]=$exp
}
else{
$match=0;
foreach $n (1...$nobs){
if($obs eq $obs[$n]) {$match = $n;}
}
if($match==0){
$obs[++$nobs]=$obs;
$nexp[$nobs]=1;
$exp[$nobs][$nexp[$nobs]]=$exp;
} else{
$matchexp=0;
foreach $nx (1...$nexp[$match]){
if($exp eq $exp[$match][$nx]) {
$matchexp++;
}
}
if($matchexp==0){
$nexp[$match]++;
$exp[$match][$nexp[$match]]=$exp;
}
}
}
}
print "$nobs\n";
foreach $n (1...$nobs){
print "$obs[$n]\t\t";
foreach $nx (1...$nexp[$n]){
print "\t$exp[$n][$nx]"
}
print "\n";
}
exit();

File Metadata

Mime Type
text/x-perl
Expires
Sun, Feb 23, 2:46 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486701
Default Alt Text
analyse (1 KB)

Event Timeline