Sponsored Content
Full Discussion: Adding indexes with PERL
Top Forums UNIX for Beginners Questions & Answers Adding indexes with PERL Post 303040863 by stomp on Friday 8th of November 2019 02:32:06 AM
Old 11-08-2019
Your task is pretty basic. You will find a lot of examples if you...

... search google for "perl read from stdin" ...
... read the documentation for the functions, e. g. perldoc -f split

I do not see where you are assigning a value to your variable $input, which you'd like to split.

Last edited by stomp; 11-08-2019 at 04:37 AM..
This User Gave Thanks to stomp For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using sed with indexes

Hi people, Is this possible and if so any tips are very welcome. Im trying to do the following: this is what I have: 800__1__ this is what I want: 8000010 12345678 Im... (1 Reply)
Discussion started by: seaten
1 Replies

2. Shell Programming and Scripting

Analyze the indexes and rebuild them

Hello UNIX and Oracle Gurus, After doing an intensive search from different websites, the UNIX forum I am posting this message seeking help.. I am trying to accomplish the following tasks through the shell script: 1. Rebuild indexes on a Table in Oracle 2. Analyze indexes and table... (0 Replies)
Discussion started by: madhunk
0 Replies

3. Shell Programming and Scripting

perl adding items to a hash

how would you go about taking a user's input and adding it to a hash? i'd also like it to permanently add the input to the hash. not just in the ram, add it into the script! :eek: (17 Replies)
Discussion started by: andrew2325
17 Replies

4. Shell Programming and Scripting

matrix indexes

I wanted to use matrixs in awk and got some problem, here is some of the script code, from the BEGIN tag: row_char="a";row_char="b";row_char="c";row_char="d";row_char="e"$ row_char="h";row_char="i";row_char="j";row_char="k"; from the proccess passage: sentence,1]=1; diffrence=4; i=7;... (2 Replies)
Discussion started by: tal
2 Replies

5. UNIX for Dummies Questions & Answers

Perl - adding columns to file

I have a file in which I need to add more columns to based on a key in the first file: File1 key1,abc,123, key2,def,456, key3,ghi,789, File2 key2,zyx,111,qqq, key3,yuu,222,www, key1,pui,333,eee, key4,xxx,999,rrr, I would like to create the following output: Output (1 Reply)
Discussion started by: WongSifu
1 Replies

6. Shell Programming and Scripting

open files with multiple indexes

Hi, I want to work with multiple files which all contain 2 numbers. I tried to make a nested for loop but for some reason it doesn't recognize the $j as a number. The output is cannot open file `175-T-pvalue.xls'. How do I make sure that it takes the numbers from the inner loop as $j? ... (4 Replies)
Discussion started by: linseyr
4 Replies

7. Shell Programming and Scripting

Adding timestap to filename using perl

Hello, I am trying to create a file in windows and i want the filename to have timestamp as well but something is wrong and i can not understand waht. The code that i use is the following ($cwkday,$cmonth,$cday,$ctime,$cyear) = split(/\s+/, localtime); $current_date =... (5 Replies)
Discussion started by: chriss_58
5 Replies

8. Shell Programming and Scripting

I need to find out disk usage for particular indexes for different hosts

Need disk utilisation script for particular indexes on few hosts (3 Replies)
Discussion started by: Krish5v
3 Replies
Text::CSV::Encoded::Coder::EncodeGuess(3pm)		User Contributed Perl Documentation	       Text::CSV::Encoded::Coder::EncodeGuess(3pm)

NAME
Text::CSV::Encoded::Coder::EncodeGuess - Text::CSV::Encoded coder class using Encode::Guess SYNOPSIS
use Text::CSV::Encoded coder_class => 'Text::CSV::Encoded::Coder::EncodeGuess'; use Spreadsheet::ParseExcel; my $csv = Text::CSV::Encoded->new(); $csv->encoding( ['ucs2', 'ascii'] ); # guessing ucs2 or ascii? $csv->encoding_to_combine('shiftjis'); my $excel = Spreadsheet::ParseExcel::Workbook->Parse( $file ); my $sheet = $excel->{Worksheet}->[0]; for my $row ( $sheet->{MinRow} .. $sheet->{MaxRow} ) { my @fields; for my $col ( $sheet->{MinCol} .. $sheet->{MaxCol} ) { my $cell = $sheet->{Cells}[$row][$col]; push @fields, $cell->{Val}; } $csv->combine( @fields ) or die; print $csv->string, " "; } DESCRIPTION
This module is inherited from Text::CSV::Encoded::Coder::Encode. USE
Except for 2 attributes, same as Text::CSV::Encoded::Coder::Encode. encoding_in $csv = $csv->encoding_in( $encoding_list_ref ); The accessor to an encoding for pre-parsing CSV strings. If no encoding is given, returns current $encoding, otherwise the object itself. $encoding_list_ref = $csv->encoding_in() When you pass a list reference, it might guess the encoding from the given list. $csv->encoding_in( ['shiftjis', 'euc-jp', 'iso-20022-jp'] ); If it cannot guess the encoding, the first encoding of the list is used. encoding $csv = $csv->encoding( $encoding_list_ref ); $encoding_list_ref = $csv->encoding(); You can pass a list reference to this attribute only: * For list data consumed by combine(). * For list reference returned by getline(). In other word, in "combine" and "print", it might guess an encoding for the passing list data. If it cannot guess the encoding, the first encoding of the list is used. SEE ALSO
Encode, Encode::Guess AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org> COPYRIGHT AND LICENSE
Copyright 2008-2010 by Makamaka Hannyaharamitu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-04-26 Text::CSV::Encoded::Coder::EncodeGuess(3pm)
All times are GMT -4. The time now is 10:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy