01-13-2011
Have you checked CPAN? Else you can program it in Perl, simply for opening another file for appending and writing to this file in addition to printing to the screen
This User Gave Thanks to ghostdog74 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
as the title suggests, i need to print a user message to a log file and the screen using perl.
in unix i set up a function using 'tee' like so
function Display_Message
{
echo "$*" | tee -ai $LOGFILE
}
the following command then obviously displays to the screen and prints to a log... (6 Replies)
Discussion started by: mjays
6 Replies
2. Shell Programming and Scripting
Hello,
I have a Apache webserver running on RedHat. Its primary function is a proxy server for users accessing the internet. I have a transaction log that logs every transactions of every users. For users trying to access certain sites/content the transactions goes into a 302 redirect loop and... (2 Replies)
Discussion started by: bruno406
2 Replies
3. Shell Programming and Scripting
Can someone tell me what I'm doing wrong with my perl script? I am new to Perl. This isn't even the final script, I'm just testing to see if it will print the directories with the files in it. For some reason my output is only printing the 1st, 6th, and last entries of the @sub_dir array. Each... (3 Replies)
Discussion started by: man
3 Replies
4. Shell Programming and Scripting
Hi Perl Gurus,
perl -e 'print "http://www.site@domain.com"'
The output of the above is :
http://www.site.com"
I want to print http://www.site@domain.com without using escape sequence before '@' like '\@'.
Is there any way to do this in perl?
Thanks,
Som (1 Reply)
Discussion started by: som.nitk
1 Replies
5. Shell Programming and Scripting
Hi All,
Is there a way in Bash we can redirection some output to both console and the file at the same time.
~Parag (2 Replies)
Discussion started by: paragkalra
2 Replies
6. Shell Programming and Scripting
Hi
I have a perl script that prints all the video and audio file information(playing duration).
It works fine in one of my friends linux laptop.
But it doesn't work in my both windows and linux.
My friend told me I have to do install some module ( ppm instal ...... )
but I have no... (1 Reply)
Discussion started by: srijith
1 Replies
7. Web Development
Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect.
Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is
redirected to welcome page.
My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies
8. Shell Programming and Scripting
I do a lot of TSM work and I embarked on what I thought would be an easy task, and I'd be very happy for any input to save the pounding my keyboard is receiving :]
By default, the output of TSM's console has no timestamping, making it hard to sort through accurately.
This puts my console into... (5 Replies)
Discussion started by: Vryali
5 Replies
9. Shell Programming and Scripting
Hi,
I am preparing a perl script, which will run some commads on remote Linux servers.
I have a file contains all the servers names one by one like below
vi servers.txt
srv1
srv2
srv3
Now, I need to prepare a perl script to ssh (or)rsh to each server in the above... (1 Reply)
Discussion started by: kumar85shiv
1 Replies
10. Programming
I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open())
I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies
LEARN ABOUT MOJAVE
cpan::meta::yaml5.18
CPAN::Meta::YAML(3pm) Perl Programmers Reference Guide CPAN::Meta::YAML(3pm)
NAME
CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files
VERSION
version 0.008
SYNOPSIS
use CPAN::Meta::YAML;
# reading a META file
open $fh, "<:utf8", "META.yml";
$yaml_text = do { local $/; <$fh> };
$yaml = CPAN::Meta::YAML->read_string($yaml_text)
or die CPAN::Meta::YAML->errstr;
# finding the metadata
$meta = $yaml->[0];
# writing a META file
$yaml_text = $yaml->write_string
or die CPAN::Meta::YAML->errstr;
open $fh, ">:utf8", "META.yml";
print $fh $yaml_text;
DESCRIPTION
This module implements a subset of the YAML specification for use in reading and writing CPAN metadata files like META.yml and MYMETA.yml.
It should not be used for any other general YAML parsing or generation task.
NOTE: META.yml (and MYMETA.yml) files should be UTF-8 encoded. Users are responsible for proper encoding and decoding. In particular, the
"read" and "write" methods do not support UTF-8 and should not be used.
SUPPORT
This module is currently derived from YAML::Tiny by Adam Kennedy. If there are bugs in how it parses a particular META.yml file, please
file a bug report in the YAML::Tiny bugtracker: <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=YAML-Tiny>
SEE ALSO
YAML::Tiny, YAML, YAML::XS
SUPPORT
Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker at <http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta-YAML>.
You will be notified automatically of any progress on your issue.
Source Code
This is open source software. The code repository is available for public review and contribution under the terms of the license.
<https://github.com/dagolden/cpan-meta-yaml>
git clone https://github.com/dagolden/cpan-meta-yaml.git
AUTHORS
o Adam Kennedy <adamk@cpan.org>
o David Golden <dagolden@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Adam Kennedy.
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.18.2 2014-01-06 CPAN::Meta::YAML(3pm)