Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9501181
reaction_fs2.pl
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
703 B
Subscribers
None
reaction_fs2.pl
View Options
#!/bin/perl -w
while
(
$
line
=
<>
){
chomp
(
$
line
);
(
$
reac
,
$
tab
,
$
reac
)
=
split
/\s+/
,
$
line
,
3
;
(
$
init
,
$
final
)
=
split
/>/
,
$
reac
;
@i
=
split
/
/
,
$
init
;
if
(
$
#i
==
2
||
$
#i
==
1
)
{
(
$
dummy
,
@j
)
=
split
/
/
,
$
final
;
foreach
$
j
(
@j
)
{
$
first
=
substr
(
$
j
,
0
,
1
);
if
(
$
first
=~
m/\d/
)
{
$
j
=
substr
(
$
j
,
1
);
}
$
first
=
substr
(
$
j
,
0
,
1
);
if
(
$
first
=~
m/\d/
)
{
$
j
=
substr
(
$
j
,
1
);
}
$
j
=
"\t$j"
;
}
if
(
$
i
[
1
]
eq
'--'
)
{
$
i
[
1
]
=
''
;}
$
final
=~
s/^\s+//
;
$
final
=~
s/\s+
$
//
;
print
$
line
,
"\t"
,
$
i
[
0
],
"\t"
,
$
i
[
1
],
"\t"
,
$
final
,
@j
,
"\n"
;
}
else
{
print
$
line
,
"\n"
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-perl
Expires
Sun, Feb 23, 2:01 PM (1 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4481949
Default Alt Text
reaction_fs2.pl (703 B)
Attached To
rHEPDATASVN hepdatasvn
Event Timeline
Log In to Comment