11-25-2011
It simply creates and prints an array, each element of which is a reference to an array of columnar data.
tyler_durden
This User Gave Thanks to durden_tyler For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a case where i am connecting to the oracle DB and reading a column value....
Script is in production...it was running fine,,,but suddenly now some times its started giving pain....
Script runs dailly....but sometimes its reading data from Oracle DB and sometimes its not rading the... (2 Replies)
Discussion started by: Sagarddd
2 Replies
2. Shell Programming and Scripting
Hello
Can someone help me to write a perl script or kornshell reading a two files and outputting to comma format.
Here is the two files
listofdisks.txt
id, diskname, diskgroup, diskisze(GB), FC
1, CN34, GRP1, 30, FC_CN34
2, CN67, GRP5, 19,
4, VD1, GRP4, 23, FC_VD1
6, CF_D1, ... (0 Replies)
Discussion started by: deiow
0 Replies
3. Shell Programming and Scripting
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)
Discussion started by: subhap
1 Replies
4. Shell Programming and Scripting
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)
Discussion started by: n.dba
3 Replies
5. Shell Programming and Scripting
I'm having trouble with this code.
if i do
.\read.pl -u user
it prints out
2010-12-20 12:00:00 host1 <cmd>a
2010-12-20 12:00:01 host1 <cmd> <execute>
2010-12-20 12:00:02 host1 <cmd>b
2010-12-20 12:00:03 host1 <cmd>c
however, if i enter
.\read.pl -h host1
it should... (3 Replies)
Discussion started by: kpddong
3 Replies
6. Shell Programming and Scripting
Hello,
I need help with a perl script that will process a text file and match virtual server name to profile(s). the rest will be ignored.
Virtual server name follows the word "virtual" in the begging of the line.
There could be multiple profiles assigned to one virtual server.
For example, ... (3 Replies)
Discussion started by: besogon
3 Replies
7. Shell Programming and Scripting
hi all,
I want to Represent the data in table format in mail content
sample data should be like this...but i m trying to send this table to mail using unix command...hw do i do????even i echoed the table contents ...doesnt work.... help me
<table style="background-color:lightblue;">... (8 Replies)
Discussion started by: navsan
8 Replies
8. Shell Programming and Scripting
Hi ,
I need an help in perl scripting.
I have an perl script written and i have an for loop in that ,where as it writes some data to a file and it has details like below.
cat out.txt
This is the first line
this is the second line.
.....Now, this file needs to be send in mail in HTML... (2 Replies)
Discussion started by: scott_cog
2 Replies
9. Shell Programming and Scripting
Hi,
I have a file with data in the following format
BOX
-1.000000 -1.000000 0.000000
30.00000 14.00000 0.1000000
0.000000 0.000000 0.000000
0.000000
0.000000
CYLINDER
3.595000 2.995000 0.000000
0.5100000 2.000000
Z
0.000000 0.000000
0.000000
I want to convert these files... (1 Reply)
Discussion started by: lost.identity
1 Replies
10. Shell Programming and Scripting
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies
LEARN ABOUT PHP
array_shift
ARRAY_SHIFT(3) 1 ARRAY_SHIFT(3)
array_shift - Shift an element off the beginning of array
SYNOPSIS
mixed array_shift (array &$array)
DESCRIPTION
array_shift(3) shifts the first value of the $array off and returns it, shortening the $array by one element and moving everything down.
All numerical array keys will be modified to start counting from zero while literal keys won't be touched.
Note
This function will reset(3) the array pointer of the input array after use.
PARAMETERS
o $array
- The input array.
RETURN VALUES
Returns the shifted value, or NULL if $array is empty or is not an array.
EXAMPLES
Example #1
array_shift(3) example
<?php
$stack = array("orange", "banana", "apple", "raspberry");
$fruit = array_shift($stack);
print_r($stack);
?>
The above example will output:
Array
(
[0] => banana
[1] => apple
[2] => raspberry
)
and orange will be assigned to $fruit.
SEE ALSO
array_unshift(3), array_push(3), array_pop(3).
PHP Documentation Group ARRAY_SHIFT(3)