in reply to Replacing second occurrence of a character

#! perl -slw use strict; while( <DATA> ) { m[^(.+)\|(.+)\|([^\|\n]+)(\|.+)?$]; if( $1 eq 'Name and Number:' or $1 eq 'Scheme:' ) { print "$1|$2 $3"; } else { print "$1\nDepartment:$2\nLevel:$3"; } } __DATA__ Name and Number:|47355|Multipurpose Room - General Scheme:|SCHEME 5.1|Water Room Title:|ELEC RM|Engineering|LEVEL 4
C:\test>1152142 Name and Number:|47355 Multipurpose Room - General Scheme:|SCHEME 5.1 Water Room Title:|ELEC RM Department:Engineering Level:LEVEL 4

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.