Just want to learn how these are read into array but I don't seem to get it right what do I go wrong?
Below is the sample
Thanks
input
1 2 3 4
5 6 7 8
9 1 2 3
4 5 6 7
#!/usr/bin/perl
open (InFILE,"input");
while (<InFILE>) {
@ar = split ; (5 Replies)
Hi All,
I am having trouble through, I am reading the input from tab delimited file containing several records,
e.g.
line1 field1 field2 field3 so on..
line2 field1 field2 field3 so on..
..
..
on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Hi,
I have a sample data file that contains name-value pairs in it.
For example:
name1=value1
name2=value2
name3=value3
...
...
...
My concern is
1. How to get values of name1, name2, name3 using korn shell script?
2. I don't want to access each varible using $name1,$name2, $name3... (2 Replies)
I am trying to read in a 2 column data file into Perl Hash array index. Here is my code.
#!/usr/bin/perl -w
use strict;
use warnings;
my $file = "file_a";
my @line = ();
my $index = 0;
my %ind_file = ();
open(FILE, $file) or die($!);
while(<FILE>) {
chomp($_);
if ($_ eq '')
{
... (1 Reply)
Hi,
i need a perl script which reads the file, content is given below. and output in new file.
TARGET DRIVE IO1 IO2 IO3 IO4 IO5
------------ --------- --------- --------- --------- ---------
0a.1.8 266 236 ... (3 Replies)
I need some help with this code below, i doesnt know why it will run twice with my function, but my function only got if else, any other way that can read line and put into array?
while read line; do
read -A array <<<$line
n=${#array}
for ((i=1;i<$n;i++)); do
print... (1 Reply)
I have a file as below. It contains two data sets separated by >.
I want to pipe each data set to another program called psxy. How
can I get the different records
Have started doing as follows but it only passes the first data set
awk 'BEGIN {RS=">"};{print $0}' p.dat
cat p.dat... (12 Replies)
Hi all,
I have written a perl code and stored the data into Data structure using Data::Dumper module.
But not sure how to retreive the data from the Data::Dumper.
Eg.
Based on the key value( Here CRYPTO-6-IKMP_MODE_FAILURE I should be able to access the internal hash elements(keys) ... (1 Reply)
Hi team,
# PERL
I have Dumper variable in perl and containing the below data and trying to fetch value and name from the reference variable.
$VAR1 = {
'retainSysIds' => 'true',
'variables' => ,
'name' => ,
... (4 Replies)
Discussion started by: giridhar276
4 Replies
LEARN ABOUT DEBIAN
template::plugin::textile2
Template::Plugin::Textile2(3pm) User Contributed Perl Documentation Template::Plugin::Textile2(3pm)NAME
Template::Plugin::Textile2 - Use Textile formatting with Template Toolkit
SYNOPSIS
[% USE Textile2 -%]
[% FILTER textile2 %]This *bold* and this is _italic_.[% END %]
<p>this is <strong>bold</strong> and this is <em>italic</em>.
[% USE Textile2 ( disable_html => 1 ) -%]
[% FILTER textile2 %]this is<br /> _italic_.[% END %]
<p>this is<br /> <em>italic</em>.</p>
DESCRIPTION
This module wraps Text::Textile into a plugin Template Toolkit. It provides a filter named "textile2". This aims to be a more feature-
full version Template::Plugin::Textile, by allowing you to pass parameters to Text::Textile.
Use this way:
[% FILTER textile2 %]
Reasons to use the Template Toolkit:
* Seperation of concerns.
* It's written in Perl.
* Badgers are Still Cool.
[% END %]
or:
[% mytext | textile2 %]
You can pass the same options you would pass to Text::Textile, directly when using the template. For instance to disable processing of HTML
tags you can do:
[% USE Textile2 ( disable_html => 1 ) %]
To avoid your text to be wrapped into "<p>...</p>" you can use:
[% USE Textile2 ( format_mode => 'inline' ) %]
See Text::Textile for details.
AUTHOR
Michele Beltrame "mb@italpro.net".
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Text::Textile, Template
perl v5.8.8 2007-09-13 Template::Plugin::Textile2(3pm)