I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Hi,
Is there any way I can grep an array against another array?
Basically here's what I need to do.
There will be an array containing some fixed texts and I have to check whether some files contain these lines. Reading the same files over and over again for each different pattern doesnt seem... (1 Reply)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Hi everyone
I have one question about using array in perl. let say I have several log file in one folder.. example
test1.log
test2.log
test3.log
and the list goes on..
how to make an array for this file? It suppose to detect log file in the current directory and all the log file will... (3 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
Hi All ,
Below is the perl code. from below code want to confirm one thing that
wahtever the sequence of data we are passing through json format which contains 3 tuples of different sequences
Eg:
ParentID,SystemID,SendingTime,Time,ClientLocation,ClientID,
... (1 Reply)
Hi all, i am using the following code to that use curl to that outputs a json, i am stuck it into a hash but i canot figure out how to get just the value i need ( hostname)
here is my code
use warnings;
use strict;
use Data::Dumper qw(Dumper);
##use JSON;
use JSON::XS;
my $curl=... (2 Replies)
This is the sample json I have pasted here. I want all the IP address strings to be converted into an array. For example "10.38.32.202" has to be converted to everywhere in the JSON. There are multiple IPs in a JSON I am pasting one sample object from the JSON. But the IPs already in an Array... (11 Replies)
Discussion started by: vinshas1
11 Replies
LEARN ABOUT DEBIAN
tm::materialized::jtm
TM::Materialized::JTM(3pm) User Contributed Perl Documentation TM::Materialized::JTM(3pm)NAME
TM::Materialized::JTM - Topic Maps, trait for JSON Topic Map instances.
SYNOPSIS
use TM::Materialized::JTM;
my $tm=TM::Materialized::JTM(file=>"somefile.jtm");
$tm->sync_in;
...
# map was modified, now save the changes
$tm->sync_out;
DESCRIPTION
This package provides map parsing and creating functionality for JTM (JSON Topic Map) instances. The JSON Topic Map format is defined
here: <http://www.cerny-online.com/jtm/1.0/>.
INTERFACE
Methods
Constructor
$tm = TM::Materialized::JTM->new (...);
The constructor expects a hash as described in TM::Materialized::Stream, with one additional key/value parameter:
o format (choices: "json", "yaml")
This option controls whether the JTM data is treated as being in JSON format or in YAML (which is a superset of JSON). This applies
to both reading and writing of map data.
The default value is "json".
format
$tm->format('json');
$curformat=$tm->format;
This method gets or sets the format parameter for future operations. Possible choices: "json", "yaml".
SEE ALSO
TM::Serializable::JTM
AUTHOR INFORMATION
Copyright 2010, Alexander Zangerl, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2010-07-18 TM::Materialized::JTM(3pm)