#!/usr/bin/perl

# Obtain the SURL of the file whose LFN we know
$surl = `lcg-lr --vo pvier lfn:uniquename`;
chop($surl);

# Now obtain the TURL for the rfio protocol
$turl = `lcg-gt $surl rfio`;

# Adapt the "rfio://hostname/path" form returned to the "hostname:path" form that rfio uses
$turl =~ s/rfio:\/\///;  # delete the extra "//"
$turl =~ s/\//:\//;      # add the ":"
chop($turl);

# Copy the input data file to the WN local filesystem
system "rfcp $turl `pwd`/values";

# Open it
open(file,'values');

# Read all the lines\\
@lines=<file>;

#Show the info
print "The values stored in the input data file are:\n";
print " @lines";
