Hi All,
I have a file like below, how can i insert one line after line 1 without using a temporary file in perl?
line 1
line 2
line 3
expected result
line 1
new line <---insert here
line 2
line 3 (2 Replies)
my $branch_email_e = $FORM{r_Branch};
my $hostbranch_email_e = $FORM{r_Host_Branch};
my $branch_email_f = $FORM{r_Direction_generale};
my $hostbranch_email_f = $FORM{r_Direction_generale_daccueil};
my $branch_realname_e = '';
my $branch_realname_f = '';
... (4 Replies)
Dear Members,
I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input.
The contents of a single cell of INFO column is like:
Area:app - aam
Clean Up Criteria:... (0 Replies)
Greetings,
I'm doing a process whereby I need to search for all filenames containing a given bit of text and grab the newest file from what may be 20 results. In a script I'm writing,
i've got a monster line to do the sort as follows:
find /opt/work/reports/input -name "*$searchtarget*" |... (4 Replies)
I have a script that runs once per month. It performs a certain task ONLY if the month is January, April, July, or October.
MONTH=`date +%m`
if || || || ; then
do something
else
do a different thing
fi
Is there a neater way of doing it than my four separate "or" comparisons? That... (2 Replies)
hi all i want a script to FTP a file and should generate a quality checksum file
means when I FTP a file from one server to another server it should generate a QC file which should contain timestamp,no.of records in that file
Thanks in advance
saikumar (3 Replies)
$ cat data
Do NOT print me
START_MARKER
Print Me
END_MARKER
Do NOT print me
$ cat awk.sh
start=START_MARKER
end=END_MARKER
echo; echo Is this ugly syntax the only way?
awk '/'"$start"'/,/'"$end"'/ { print }' data
echo; echo Is there some modification of this that would work?
awk... (2 Replies)
Hello,
I have some tab delimited text data,
index name chg_p chg_m
1 name,1 1 0
2 name,2 1 1
3 name,3 1 0
4 name,4 1 0
5 name,5 1 1
I need to duplicate the "index" column, call it "id" and insert it after the... (8 Replies)
Hi Folks,
I have just spent a couple of days resolving some problems at the remote DR data centre, sorting out the problems caused by the over zealous use of a Vacuum cleaner of all things.
We have a backup server a SUN V480R with a Storedge 3510 and expansion attached which suffered a... (6 Replies)
Discussion started by: gull04
6 Replies
LEARN ABOUT CENTOS
module::install::with
Module::Install::With(3) User Contributed Perl Documentation Module::Install::With(3)
interactive
The "interactive" function tests for an install that has a user present (or at least, one in which it is reasonable for us to present
prompts and other similar types of things).
Returns true if in an interactive environment, or false otherwise.
automated_testing
Are we currently running in an automated testing environment, such as CPAN Testers.
This is primarily a cleaner and more human-readable equivalent of checking $ENV{AUTOMATED_TESTING} yourself, but may be improved in line
with best practices at a later date.
release_testing
Are we currently running in an release testing environment. That is, are we in the process of running in a potential highly-intensive and
high dependency bloat testing process prior to packaging a module for release.
This is primarily a cleaner and more human-readable equivalent of checking $ENV{RELEASE_TESTING} yourself, but may be improved in line with
best practices at a later date.
win32
The "win32" function tests if the Makefile.PL is currently running in a native Microsoft Windows Perl, such as ActivePerl or Strawberry
Perl.
This is primarily a cleaner and more human-readable equivalent of checking "$^O eq 'MSWin32'" yourself, but may be improved in line with
best practices at a later date.
winlike
The "winlike" function tests if the Makefile.PL is currently running in a Microsoft Windows Perl, under either cygwin or a native Win32
Perl.
This is primarily a cleaner and more human-readable equivalent of checking "$^O eq 'MSWin32' or $^O eq 'cygwin'"yourself, but may be
improved in line with best practices at a later date.
SEE ALSO
Module::Install
AUTHORS
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2007 - 2012 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.3 2012-03-01 Module::Install::With(3)