Sponsored Content
Top Forums Programming Dynamically added text fields passed to PHP script Post 302786057 by Corona688 on Tuesday 26th of March 2013 06:50:09 PM
Old 03-26-2013
So they are stored as names boxes1...boxesn? You could do a while-loop, checking whether each column exists in POST, adding to the end of a string each time. Then the rest of the fields once that's done.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

combining fields in two text fields

Can someone tell me how to do this using sed, awk, or any other basic shell scripting? Basically I have two text files with the following contained in each file: File A: a b c d e f g h i File B: 1 2 3 I want the final outcome to look like this: a b c 1 d e f 2 g h i 3 How... (3 Replies)
Discussion started by: shocker
3 Replies

2. Shell Programming and Scripting

Get the latest added part of a text file?

Hi, I want to get the latest added part of a text file sent over the network to for analysis. Is there a tool to use to keep track of which part of a text file that has already been analysed so only the "new" lines will be sent and handled? I have checked a few tools but I still donīt know how to... (3 Replies)
Discussion started by: pcrs
3 Replies

3. Shell Programming and Scripting

I want Trailer to be added into the text file.

Hi folks, I want Trailer to be added into the txt file the format is below. flatfile-> abc.txt count of the file is 500 records. I want the trailer in this format: TRAILER|500 (pipe delimeter). Please suggest the comands ASAP. Rgds Ann (5 Replies)
Discussion started by: Haque123
5 Replies

4. Shell Programming and Scripting

Dynamically creating text files using shell script

Hi All, I want to create a shell script which dynamically create text files. i am using the following script $i=1 while do cat > test_$i.txt done but while running the script it was stopping(the cursor not going to next step, i have to enter ctrl+c to make it stop). it is creating only... (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies

5. Shell Programming and Scripting

Need to echo a text where a (.) is added to the end of line during on-going copy or ftp

Hello All, I would like to create a script to echo a text where a (.) dot is added every 2 seconds to the end of this text (with a limit of 10 dots) as long as a file copy or ftp is ongoing and once the copy is finished it adds "done" to the end of this text line. please see the below example: ... (6 Replies)
Discussion started by: Dendany83
6 Replies

6. Shell Programming and Scripting

How to create dynamically associative array in PHP?

Hi, I have an html page like this: <html> <body> <form action="test.php" method = "post"> Enter your name:<input name="search" type = "text" size ="40"> <br> Enter your age:<input name="age" type = "text" size ="20"> <input type = "submit" name="submit" value="search"> <input type =... (1 Reply)
Discussion started by: vanitham
1 Replies

7. Shell Programming and Scripting

Shell script to find the sum of argument passed to the script

I want to make a script which takes the number of argument, add those argument and gives output to the user, but I am not getting through... Script that i am using is below : #!/bin/bash sum=0 for i in $@ do sum=$sum+$1 echo $sum shift done I am executing the script as... (3 Replies)
Discussion started by: mukulverma2408
3 Replies

8. Shell Programming and Scripting

Swap of fields dynamically

Dear Friends, I have file a.txt 1|2|3|4|5|6|7|8 a|b|c|d|e|f|g|h i am using the below code to swap the fields in file awk -F\| '{print $5,$1,$2,$3,$4,$6,$7,$8}' OFS=\| a.txt > output.txt output.txt 5|1|2|3|4|6|7|8 e|a|b|c|d|f|g|h The above command is working fine. I am... (4 Replies)
Discussion started by: i150371485
4 Replies

9. UNIX for Dummies Questions & Answers

Sending mail to multiple recipient added in a text file

I am trying to find a code that can help me mail to a list of recipients which are in a text file. Sample code $cat recipient.txt me@test.com me1@test.com me2@test.com I want a mailx step that can read contents of recipient.txt and mail to all the users. I don't want to use mails... (1 Reply)
Discussion started by: Gurkamal83
1 Replies

10. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
Data::Visitor::Callback(3pm)				User Contributed Perl Documentation			      Data::Visitor::Callback(3pm)

NAME
Data::Visitor::Callback - A Data::Visitor with callbacks. VERSION
version 0.28 SYNOPSIS
use Data::Visitor::Callback; my $v = Data::Visitor::Callback->new( # you can provide callbacks # $_ will contain the visited value value => sub { ... }, array => sub { ... }, # you can also delegate to method names # this specific example will force traversal on objects, by using the # 'visit_ref' callback which normally traverse unblessed references object => "visit_ref", # you can also use class names as callbacks # the callback will be invoked on all objects which inherit that class 'Some::Class' => sub { my ( $v, $obj ) = @_; # $v is the visitor ... }, ); $v->visit( $some_perl_value ); DESCRIPTION
This is a Data::Visitor subclass that lets you invoke callbacks instead of needing to subclass yourself. METHODS
new %opts, %callbacks Construct a new visitor. The options supported are: ignore_return_values When this is true (off by default) the return values from the callbacks are ignored, thus disabling the fmapping behavior as documented in Data::Visitor. This is useful when you want to modify $_ directly tied_as_objects Whether ot not to visit the "tied" in perlfunc of a tied structure instead of pretending the structure is just a normal one. See "visit_tied" in Data::Visitor. CALLBACKS
Use these keys for the corresponding callbacks. The callback is in the form: sub { my ( $visitor, $data ) = @_; # or you can use $_, it's aliased return $data; # or modified data } Within the callback $_ is aliased to the data, and this is also passed in the parameter list. Any method can also be used as a callback: object => "visit_ref", # visit objects anyway visit Called for all values value Called for non objects, non container (hash, array, glob or scalar ref) values. ref_value Called after "value", for references to regexes, globs and code. plain_value Called after "value" for non references. object Called for blessed objects. Since "visit_object" in Data::Visitor will not recurse downwards unless you delegate to "visit_ref", you can specify "visit_ref" as the callback for "object" in order to enter objects. It is reccomended that you specify the classes (or base classes) you want though, instead of just visiting any object forcefully. Some::Class You can use any class name as a callback. This is colled only after the "object" callback. If the object "isa" the class then the callback will fire. These callbacks are called from least derived to most derived by comparing the classes' "isa" at construction time. object_no_class Called for every object that did not have a class callback. object_final The last callback called for objects, useful if you want to post process the output of any class callbacks. array Called for array references. hash Called for hash references. glob Called for glob references. scalar Called for scalar references. tied Called on the return value of "tied" for all tied containers. Also passes in the variable as the second argument. seen Called for a reference value encountered a second time. Passes in the result mapping as the second argument. AUTHORS
o Yuval Kogman <nothingmuch@woobling.org> o Marcel Gruenauer <marcel@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Yuval Kogman. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-02-12 Data::Visitor::Callback(3pm)
All times are GMT -4. The time now is 09:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy