Hi
Three questions
1. I've got some data (see below) that contains @{}*, how would i escape these characters.
I tried using quotemeta but but i get the following error messages if i try to print $testString.
Possible unintended interpolation of @Rose in string at prints1.pl line 13
Possible unintended interpolation of @outside in string at prints1.pl line
Name "main::Rose" used only once: possible typo at prints1.pl line 13.
Name "main:utside" used only once: possible typo at prints1.pl line 13.
2. How would i get a list of field names indicated by the first four uppercase letters on each line. Each record is separated by an asterix (*).
3. How would i produce a list of unique field names, ie: the first 4 uppercase letter. That is if the name exists on the list it's not duplicated.
TEST DATA:
$testString = quotemeta("<IPGR
<RIDE
<RICN PDC
<RIIN PAF5175
<ITID
<ITCO original art: print
<ITTI Peldon @Rose - The Hunt @outside an Inn
<ITRP RM/44/113
<ITPA unmounted
<IDES
<IDPH
<IDPE etching
<IDCA
<IDCC A
<IDCV BD
<IDCU C
<IDOV
<IDOH 126mm
<IDOW 165mm
<PROD
<PRMA Briscoe, Arthur John Trevor [artist & engraver]
<ACQU
<ACDA Nov 1960
<ACME purchase
<ACPP Briscoe, Arthur
<ACAN PR1960-278
<ACMF A 1956-1960 Colnaghi, P & D, & Co Ltd (NMM8/1600)
<MLOC
<MLDM 29 Jan 1992
<MLRE storage
<MLLO 0540
<VALU
<MUST
<MUDA 24 Feb 1992
<MURE sighted
<MUPE Dormer, J
<MREF
<MNEG
<MNNO PW5175
<OTHE
<OTNO LCBE L.3
<NOTS
<NOTE Collection A Laver 1-25.
<NOTE Signed by artist.
<NOTE Box Title: H20.4 Etchings - Arthur Briscoe 1943.
*
<IPGR
<RIDE
<RICN PDC
<RIIN PAF5176
<ITID
<ITCO original art: print
<ITTI Wyatt's @{Corner - A coastal village scene}
<ITRP RM/44/114
<ITPA unmounted
<IDES
<IDPH
<IDPE etching
<IDCA
<IDCC A
<IDCV BD
<IDCU C
<IDOV
<IDOH 125mm
<IDOW 162mm
<PROD
<PRMA Briscoe, Arthur John Trevor [artist & engraver]
<ACQU
<ACDA Nov 1960
<ACME purchase
<ACPP Briscoe, Arthur
<ACAN PR1960-278
<ACMF A 1956-1960 Colnaghi, P & D, & Co Ltd (NMM8/1600)
<MLOC
<MLDM 29 Jan 1992
<MLRE storage
<MLLO 0540
<VALU
<MUST
<MUDA 24 Feb 1992
<MURE sighted
<MUPE Dormer, J
<MREF
<MNEG
<MNNO PW5176
<OTHE
<OTNO LCBE L.4
<NOTS
<NOTE Collection A Laver 1-25.
<NOTE Signed by artist.
<NOTE Box Title: H20.4 Etchings - Arthur Briscoe 1943.
*")
Kitty
Three questions
1. I've got some data (see below) that contains @{}*, how would i escape these characters.
I tried using quotemeta but but i get the following error messages if i try to print $testString.
Possible unintended interpolation of @Rose in string at prints1.pl line 13
Possible unintended interpolation of @outside in string at prints1.pl line
Name "main::Rose" used only once: possible typo at prints1.pl line 13.
Name "main:utside" used only once: possible typo at prints1.pl line 13.
2. How would i get a list of field names indicated by the first four uppercase letters on each line. Each record is separated by an asterix (*).
3. How would i produce a list of unique field names, ie: the first 4 uppercase letter. That is if the name exists on the list it's not duplicated.
TEST DATA:
$testString = quotemeta("<IPGR
<RIDE
<RICN PDC
<RIIN PAF5175
<ITID
<ITCO original art: print
<ITTI Peldon @Rose - The Hunt @outside an Inn
<ITRP RM/44/113
<ITPA unmounted
<IDES
<IDPH
<IDPE etching
<IDCA
<IDCC A
<IDCV BD
<IDCU C
<IDOV
<IDOH 126mm
<IDOW 165mm
<PROD
<PRMA Briscoe, Arthur John Trevor [artist & engraver]
<ACQU
<ACDA Nov 1960
<ACME purchase
<ACPP Briscoe, Arthur
<ACAN PR1960-278
<ACMF A 1956-1960 Colnaghi, P & D, & Co Ltd (NMM8/1600)
<MLOC
<MLDM 29 Jan 1992
<MLRE storage
<MLLO 0540
<VALU
<MUST
<MUDA 24 Feb 1992
<MURE sighted
<MUPE Dormer, J
<MREF
<MNEG
<MNNO PW5175
<OTHE
<OTNO LCBE L.3
<NOTS
<NOTE Collection A Laver 1-25.
<NOTE Signed by artist.
<NOTE Box Title: H20.4 Etchings - Arthur Briscoe 1943.
*
<IPGR
<RIDE
<RICN PDC
<RIIN PAF5176
<ITID
<ITCO original art: print
<ITTI Wyatt's @{Corner - A coastal village scene}
<ITRP RM/44/114
<ITPA unmounted
<IDES
<IDPH
<IDPE etching
<IDCA
<IDCC A
<IDCV BD
<IDCU C
<IDOV
<IDOH 125mm
<IDOW 162mm
<PROD
<PRMA Briscoe, Arthur John Trevor [artist & engraver]
<ACQU
<ACDA Nov 1960
<ACME purchase
<ACPP Briscoe, Arthur
<ACAN PR1960-278
<ACMF A 1956-1960 Colnaghi, P & D, & Co Ltd (NMM8/1600)
<MLOC
<MLDM 29 Jan 1992
<MLRE storage
<MLLO 0540
<VALU
<MUST
<MUDA 24 Feb 1992
<MURE sighted
<MUPE Dormer, J
<MREF
<MNEG
<MNNO PW5176
<OTHE
<OTNO LCBE L.4
<NOTS
<NOTE Collection A Laver 1-25.
<NOTE Signed by artist.
<NOTE Box Title: H20.4 Etchings - Arthur Briscoe 1943.
*")
Kitty