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)
I'm trying to make changes in a file using the following bash script:
#!/bin/bash
MYHOME=`echo $HOME`
README=$MYHOME"/environment"
IAM=`whoami`
CHANGEPATHLIST="TALOG TACONFIG TAINFO TAWORK TMPSPACE"
for var in $CHANGEPATHLIST
do
perl -pi -e 's/sacuser1/$IAM/ if m/$var/' $README... (3 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)
I was trying to store the number of lines in a file and store it in a file.after that i want to store the information in a file to a variable which is further used in the if loop to check certain condition.
#!/bin/bash
cat <file> | wc -l > count.txt
x="$count.txt";
i=10;
if ; then
cat... (10 Replies)
Hi, I am writting some perl scripts for daily backup process. In which I want to pass some data/referance from another txt file. Text file contains only one column and multiple rows. I want to pass this data to variables of another perl script.
e.g.
Refdoc.txt file contains data as:
perl1... (3 Replies)
I am new to Perl and just started using the data::dumper.
i have been unable to figure out how to take the output that comes from the data::dumper and redirect it to a file.
I tried this....
sub postEvent {
my $this = shift;
# print "Passed parameters, " . Dumper(\@_) .... (3 Replies)
HI,
i have variable in perl like below
$tmp="/home/sai/automation/work/TFP_GN.txt"
it can conatain any path its filled from config file.
now i want extarct the path upto this /home/sai/automation/work/ and put it in another variable
say... (4 Replies)
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)
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)
I have a file abc.ini and declared many variables in that file, one of the variable(DBname) value I am trying to read in my perl script but getting error.
File abc.ini content
# database name
DBname =UATBOX
my $ex_stat;
my $cmd_output;
$ex_stat = "\Qawk '/^DBname/{print... (2 Replies)
Discussion started by: Devesh5683
2 Replies
LEARN ABOUT DEBIAN
emboss::gui::conf
EMBOSS::GUI::Conf(3pm) User Contributed Perl Documentation EMBOSS::GUI::Conf(3pm)NAME
EMBOSS::GUI::Conf - repository for EMBOSS::GUI site-specific configuration
AUTHOR
Luke McCarthy <lukem@gene.pbi.nrc.ca>
SYNOPSIS
use EMBOSS::GUI::Conf;
$conf = EMBOSS::GUI::Conf->new();
foreach $app ($conf->apps) {
($name, $doc) = @$app;
if (!$conf->is_excluded($name)) {
...
}
}
foreach $group ($conf->groups) {
$group_name = shift @$group;
if (!conf->is_excluded($group_name) {
foreach $app (@$group) {
($name, $doc) = @$app;
...
}
}
}
DESCRIPTION
EMBOSS::GUI::Conf contains site-specific configuration information for EMBOSS::GUI. Consult the source for a description of the variables
that can be set.
Public methods are described below:
new()
Returns a new EMBOSS::GUI::Conf object. This method stores the EMBOSS::GUI::Conf package variables in the object hash, ensures that
the specified output path is writeable and adds the EMBOSS binaries to the path.
apps()
Returns a list of available EMBOSS applications. Each element of the list is a reference to an array containing the name and
description of an application.
groups()
Returns a list of application groups. Each element of the list is a reference to an array containing the name of the group and a list
of applications belonging to that group (each application is in turn a reference to an array as described in apps() above.) Note that
an individual application can appear in multiple groups.
is_excluded($subject)
Returns true if the subject is being excluded from public display, false otherwise.
$subject is the name of an application or application group as it appears in the output from wossname.
databases()
Returns a list of available databases. Each element of the list is the name of a database, suitable for use in a USA.
matrices()
Returns a list of available alignment scoring matrices. Each element of the list is a reference to an array containing the filename of
the scoring matrix, suitable for use as the value of a matrix or matrixf argument, and a description of the matrix.
codon_usage_tables()
Returns a list of available codon usage tables. Each element of the list is a reference to an array containing the filename of the
codon usage table, suitable for use as the value of a codon argument, and the name of the species from which it is derived.
BUGS
None that I know of.
COPYRIGHT
Copyright (c) 2004 Luke McCarthy. All rights reserved. This program is free software. You may copy or redistribute it under the same
terms as Perl itself.
perl v5.14.2 2013-09-16 EMBOSS::GUI::Conf(3pm)