~ubuntu-branches/ubuntu/gutsy/horae/gutsy

« back to all changes in this revision

Viewing changes to 0CPAN/STAR-Parser-0.59/bin/filter.pl

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2006-12-28 12:36:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061228123648-9xnjr76wfthd92cq
Tags: 064-1
New upstream release, dropped dependency on libtk-filedialog-perl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/local/bin/perl -w
2
 
 
3
 
###################################
4
 
#                                 #
5
 
# Script filter.pl                #
6
 
# Wolfgang Bluhm, SDSC            #
7
 
#                                 #
8
 
###################################
9
 
 
10
 
use STAR::Filter;
11
 
use strict;
12
 
 
13
 
my $data = STAR::DataBlock->new($ARGV[0]);
14
 
my $dict = STAR::Dictionary->new($ARGV[1]);
15
 
 
16
 
my $out = STAR::Filter->filter_through_dict(-data=>$data,
17
 
                                            -dict=>$dict);
18
 
 
19
 
my $outname = $ARGV[0].'.filtered';
20
 
$out->store($outname);
21
 
 
22
 
=head1 DESCRIPTION
23
 
 
24
 
 Reads a data structure (.cob file) and filters it through a dictionary (.cob file).
25
 
 Only items present in the dictionary are retained in the file.
26
 
 Outputs a new data structure file (.cob file -- original name + ".filtered").
27
 
 
28
 
=head1 USAGE
29
 
 
30
 
 perl filter.pl <data.cob> <dict.cob>
31
 
 
32
 
=cut
33
 
 
34