XROOTD-L Archives

Support use of xrootd by HEP experiments

XROOTD-L@LISTSERV.SLAC.STANFORD.EDU

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Gregory J. Sharp" <[log in to unmask]>
Date:
11 Nov 2004 19:59:52 -0500Thu, 11 Nov 2004 19:59:52 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
Some irony - I am reporting a bug that I induced with a previous bug 
report ... sorry about that.

mps_Stage, on or about line 679 should be changed from

while( <CONFIG> ) {
    s/#.*$//;       #remove comments
    ($var, $val) = split("\s",$_,2);
    ($x, $val) = split("\s", $val,2) if $val =~ /^= /; # remove =

to

while( <CONFIG> ) {
    chomp;
    s/#.*$//;       #remove comments
    ($var, $val) = split(/\s/,$_,2);
    ($val) = (split(/\s/,$val,2))[1] if $val =~ /^= /; # remove =

The chomp is not essential, but right.
The /\s/ is a pattern. The string "\s" is just "\s", so it splits on 
the letter s.
The change to the last line is because $x is not needed, and this makes 
that clearer ;-)

--
Gregory J. Sharp                   email: [log in to unmask]
Wilson Synchrotron Laboratory      url: 
http://www.lepp.cornell.edu/~gregor
Dryden Rd                          ph:  +1 607 255 4882
Ithaca, NY 14853                   fax: +1 607 255 8062




ATOM RSS1 RSS2