I have a question regarding running perl in the current process.
I shall demonstrate with an example.
Look at this.
sh-2.05b$ pwd
/tmp
sh-2.05b$ cat test.sh
#! /bin/sh
cd /etc
sh-2.05b$ ./test.sh
sh-2.05b$ pwd
/tmp
sh-2.05b$ . ./test.sh
sh-2.05b$ pwd
/etc
sh-2.05b$
So... (10 Replies)
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Hi Buddies,
my pc has two CPU, so CPU1 and CPU2.
I have a perl "a.pl", when i "./a.pl", i can see the CPU1 is full or CPU2 is full, mean only one is full, another one is idle.
Wonderring what shall i do in order to let both CPU to process this a.pl.:(
Thanks (1 Reply)
Hi
Need a perl script to read lines in a file, scan for a string named "APPLE" and write to different file the only lines containing the matched string. (5 Replies)
Iam trying to load the full path of multiplie files in the same directory to an array if the filenames matches a pattern. The following is the current code;
where $input=C:\test
# change to and open the comparison directory
chdir("$input2") || die "Cannot change dir: $!";
opendir(DIR2,... (2 Replies)
so in unix this command works works and shows me a list of directories
find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt
but when i try running a perl script to run this command
my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ?
Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Hi, I got problem with queue code how to determined empty and full and problem with while loop
Here is my pseudo code :
Input page Access
Input Pgae Frame
For i =3 to pageframe count by 1
construct queue of size i
set pageFaultCount to 0
while morepages do
page = NextPage... (1 Reply)
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
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 DEBIAN
ouse
ouse(3pm) User Contributed Perl Documentation ouse(3pm)NAME
ouse - syntactic sugar to make Mouse one-liners easier
SYNOPSIS
# create a Mouse class on the fly ...
perl -Mouse=Foo -e 'has bar => ( is=>q[ro], default => q[baz] ); print Foo->new->bar' # prints baz
# loads an existing class (Mouse or non-Mouse)
# and re-"opens" the package definition to make
# debugging/introspection easier
perl -Mouse=+My::Class -e 'print join ", " => __PACKAGE__->meta->get_method_list'
DESCRIPTION
ouse.pm is a simple source filter that adds "package $name; use Mouse;" to the beginning of your script and was entirely created because
typing perl "-e'package Foo; use Mouse; ...'" was annoying me... especially after getting used to having "-Moose" for Moose.
INTERFACE
"ouse" provides exactly one method and it is automatically called by perl:
"oose->import()">
Pass a package name to import to be used by the source filter.
DEPENDENCIES
You will need Filter::Simple and eventually Mouse
INCOMPATIBILITIES
None reported. But it is a source filter and might have issues there.
SEE ALSO
oose for "perl -Moose -e '...'"
AUTHOR
For all intents and purposes, blame:
Chris Prather "<perigrin@cpan.org>"
...who wrote oose.pm, which was adapted for use by Mouse by:
Ricardo SIGNES "<rjbs@cpan.org>"
COPYRIGHT AND LICENSE
Copyright 2008 Shawn M Moore.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-06-30 ouse(3pm)