Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

opal::read(3pm) [debian man page]

read(3pm)						User Contributed Perl Documentation						 read(3pm)

NAME
OpaL::read - Perl extension for reading files and commands. SYNOPSIS
use OpaL::read qw(functions); No functions or variables are exported automaticly so you have to specify them here. DESCRIPTION
OpaL::read is used for reading files and commands. All functions are autoloaded so they will not be loaded into memory if you have not used them before. FUNCTIONS
readfile Reads the content of the specified file and returns a list with the all lines. USAGE: @foo = "readfile"($filename); readfileline Reads the first line of the specified file and returns a scalar with that line. USAGE: $foo = "readfileline"($filename); readscalarfile Reads the content of the specified file and returns a scalar with the entire content. USAGE: $foo = "readscalarfile"("filename"); readcommand Reads the content from the output of the specified command and returns a list with the all lines. USAGE: @foo = "readcommand"("command"); readcommandline Reads the first line from output of the specified command and returns a scalar with that line. USAGE: $foo = "readcommandline"("command)"; readscalarfile Reads the content for the output of the specified file and returns a scalar with the entire content. USAGE: $foo = "readscalarcommand"($command); AUTHOR
Ola Lundqvist <ola@inguza.com> SEE ALSO
perl(1). perl v5.10.1 2012-08-21 read(3pm)

Check Out this Related Man Page

Parser::Style::Tree(3pm)				User Contributed Perl Documentation				  Parser::Style::Tree(3pm)

NAME
XML::Parser::Style::Tree - Tree style parser SYNOPSIS
use XML::Parser; my $p = XML::Parser->new(Style => 'Tree'); my $tree = $p->parsefile('foo.xml'); DESCRIPTION
This module implements XML::Parser's Tree style parser. When parsing a document, "parse()" will return a parse tree for the document. Each node in the tree takes the form of a tag, content pair. Text nodes are represented with a pseudo-tag of "0" and the string that is their content. For elements, the content is an array reference. The first item in the array is a (possibly empty) hash reference containing attributes. The remainder of the array is a sequence of tag- content pairs representing the content of the element. So for example the result of parsing: <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo> would be: Tag Content ================================================================== [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [ {}, 0, "Howdy", ref, [{}]], 0, "do" ] ] The root document "foo", has 3 children: a "head" element, a "bar" element and the text "do". After the empty attribute hash, these are represented in it's contents by 3 tag-content pairs. perl v5.14.2 2011-11-15 Parser::Style::Tree(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to print content on the screen

I have the following questions regrading Unix commands. 1. Could you provide the commands how to print the content of .profile and .shrc files on the screen using more and piple command? or a better way? 2. How can i use the head and tail to display lines from 25 through 75... or a better... (4 Replies)
Discussion started by: aadba
4 Replies

2. UNIX for Dummies Questions & Answers

how to read lines one by one from a file

I have one file in which some commands have written line line i have to read lines from this file(file name passed as avariable) and then i have to execute these commands.. how can i do it? (5 Replies)
Discussion started by: bihani4u
5 Replies

3. UNIX for Advanced & Expert Users

Read the entire output fired by ps command

Actually I want to display the entire output fired by ps command. My output gets trucated after 80 chars. Thus, i am not able to see the entire command running when i give a ps -eaf .... Does anyone know how do i display the entire output fired by ps command .. (i.e the command along with... (5 Replies)
Discussion started by: vinithepoo
5 Replies

4. Shell Programming and Scripting

read and match multiple lines in perl

Could any one tell me how to read and match multiple lines in perl? Did this code below still work in this situation? while (<FILE>) { if (/ /) { } } Thanks a lot! (5 Replies)
Discussion started by: zx1106
5 Replies

5. Shell Programming and Scripting

adding the content of a file to another file

hi guys, I posted a similar question about reading a file and adding its content to another file and i used sed '/HELLO/r fileB' fileA however this command adds the content of fileB under the word "HELLO" what if i need to add the word above "HELLO". what could i use? Thanks, (6 Replies)
Discussion started by: ROOZ
6 Replies

6. Shell Programming and Scripting

How to print the number of lines from a file, the starting string should be passed`

Hi , I have file, which has the below content: line 100 a b c d line300 a s d f s line200 a s d a (3 Replies)
Discussion started by: little_wonder
3 Replies

7. Shell Programming and Scripting

Problem in reading a file content

Hi, I am reading a file line by line using read line function of while loop. Each line contains 4 fields. I want to take these 4 values in 4 variables in each iteration so that i can use them in my script. The issue here is that my awk command is returning awkward results - Here is a sample line... (8 Replies)
Discussion started by: garman
8 Replies

8. Shell Programming and Scripting

read from different files

i have the following files with content file a content; 1234|wert| file b content; 2345|byte| file c content; 9999|kilo| i want to read the contents of three files seperately and for each of them select the first column and output below welcome 1234 welcome 2345 welcome... (6 Replies)
Discussion started by: tomjones
6 Replies

9. Shell Programming and Scripting

Why does my script only read two lines of a file and not the third

I'm learning about the read command and wrote this little script to read data from a file: readfile() { while read variable; do echo $variable done } readfile < File.txt I have three lines in File.txt; each a single word. The script only echoes the first two lines and drops the... (9 Replies)
Discussion started by: Straitsfan
9 Replies

10. Shell Programming and Scripting

While read line ignores the '\' in file content

I need to read temp.$i file content line by line through while loop but somehow the '\' do not appear in output.. Can someone guide how to read this exact content line by line in unix : if then cat temp.$i | head -1 # the file content appears fine while... (13 Replies)
Discussion started by: Prev
13 Replies

11. Shell Programming and Scripting

want to print the file content from the specific line

Hi All, I would like to print the content from the specific line of a file . For example... i have file abc.txt which has 100 lines of code ,from this file i would like to print the content from 20,19,18th line......like that Regards Srikanth (4 Replies)
Discussion started by: srikanthg
4 Replies

12. Shell Programming and Scripting

Perl SCript to read file content (if else statemenet)

Hi All, I wanted to write a perl script to read the content in a file,the file content is either 0 (zero) OR 1. The idea is like this. If (content =1), then it will proceed to perform some step. and then update the file content to 0(zero) else if (content =0), it will update the content to... (11 Replies)
Discussion started by: hploh
11 Replies

13. UNIX for Dummies Questions & Answers

UNIX Help for reading line

Hi there, I am trying to read the content such that if there is 'adsmsext.dll', it will read everything from line one until it reads line 6 with 'C:' then it will terminate at line 5. 1. C:\WINDOWS\system32\adsmsext.dll NT AUTHORITY\Authenticated Users:R 2. ... (5 Replies)
Discussion started by: alvinoo
5 Replies

14. Shell Programming and Scripting

How to prepend filename to its content without a third file?

Hello, Is possibly there a way to prepend the filename to its content without a third file? The reason is to add a header to each file contents to distinguish each other when they are pasted side-by-side. sample.txt: XLOC_001 0 XLOC_002 23 XLOC_003 4 XLOC_012 6output (with the same... (4 Replies)
Discussion started by: yifangt
4 Replies

15. Shell Programming and Scripting

Extract line from file and save as new file.

Hello, I have a tab-file "result.txt "that looks like this CNV.ID Sample Correlation N.comp Start.b End.b CNV.type N.exons BF Reads.expected Reads.observed Reads.ratio Gene 1 S10.Run.variant_ready 0.999411647 7 381 382 duplication 2 ... (9 Replies)
Discussion started by: nans
9 Replies