I am getting no response from this post on the FreeBSD Forums:
https://forums.freebsd.org/threads/56291/
If I try to execute a simple perl script that utilizes the DBI, the
following error diagnostic:
|# perl -T create_roster_db.pl
DBI.c: loadable library and perl binaries are mismatched
){
say 'hello';
say 'goodbye' if $VERBOSE 1;
}
Ron
From: Sharanbasappa Raghapur, ERS, HCLTech shar...@hcl.com
To: Perl Beginners beginners@perl.org
Sent: Tuesday, July 7, 2015 4:40:35 AM
Subject: Debugging and passing constant value at run time
Hi,
I am using constant mainly to enable
Which means that neither approach is perfect. I still prefer the variable over
the constant.
I have never done any benchmark tests to see if there is any significant
performance difference. Have you?
Ron
- Original Message -
From: Shawn H Corey shawnhco...@gmail.com
To: beginners
($ENV{PATH},0,0); #$foo tainted if $ENV{PATH} is tainted
Thank, and sorry for my runglish :)
I have not used it myself, but the Taint::Util module looks like it does
just what you want.
http://search.cpan.org/~avar/Taint-Util-0.08/Util.pm
--
Ron Bergin
--
To unsubscribe, e-mail: beginners
Kevin Walzer wrote:
Running this code in Perl:
use LWP::Simple;
my $url= http://mywebsite.com/foo.ini;;
my $page = get($url);
produced this error:
sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
Those error messages
¦
}
This gives me an error.
What is the correct syntax?
I don't see any valid reason why you'd want to do that, but if that's what
you want, you could accomplish it with the use of eval.
my $foo = eval MyFoo::${pgm}Bar-new;
--
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
Uri Guttman wrote:
On 11/08/2014 10:40 AM, Ron Bergin wrote:
you could accomplish it with the use of eval.
my $foo = eval MyFoo::${pgm}Bar-new;
ewww. never use string eval for something as simple as that.
my $foo = MyFoo::${pgm}Bar-new() ;
that is just fine there. the class in a class
-nE'say((split/\s+/)[-1])' file
--
Don't stop where the ink does.
Shawn
You say you wouldn't use a slice but then go ahead and use a slice?
According to the perldata documentation, that is a list slice. Maybe you
meant to say you wouldn't use an array slice?
---
Ron Bergin
',
'95112'
]
];
--
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Ron Bergin wrote:
Others have already pointed what you were doing wrong, so I'll point out
something else.
Instead of using 2 separate split statements, I'd use a single split
statement to assign $state and a @zipcodes array.
use 5.010;
use strict;
use warnings;
use Data::Dumper;
my
Sunita Pradhan wrote:
I want to write a script which will verify a valid email address .
Could anybody give some ideas , how to write a pattern for this ?
-Sunita
Take a look at the Email::Valid module.
http://search.cpan.org/~rjbs/Email-Valid-1.194/lib/Email/Valid.pm
--
To unsubscribe,
Sunita Pradhan wrote:
I do not want to use Cpan modules .
-Sunita
What do you have against using a cpan module?
If you don't want to use the module, then why not simply copy/use the
regex that it uses to do the validation?
$RFC822PAT = 'EOF';
Uday Vernekar wrote:
Dear All,
Slight Correction Made in Above Code.
I am grepping this Pattern depending on run count which will Always same
Pass count and Fail count will Vary.
| 72| Traffic Test |1| 561|
[Code]
#!/usr/bin/perl
use 5.10.0;
use strict;
use
Uday Vernekar wrote:
Hi All,
I have following Pattern from which I need to grep only the Fail count and
store that in a variable.
U/A/S|Test|Test |Loop | Run |Pass |Fail|
Arguments
| Name |Count|Count|Count|Count |
;
}
}
---
Ron
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Martin G. McCormick wrote:
I have a perl script that I run as root which needs to
move a file from where it is to another directory.
I keep getting the Usage help message and a
permission denied. If I su to root and manually make the move,
it works.
The perl script is
Shaji,
I've
recently (6 months ago) created just such an application. My
approach was to create a simple template engine that supports 3 kinds
of tags. The template engine will read a template
file looking for these tags. When a tag is found, the text for
the tag is replaced by a some
I have and object with a function called new. (seen below). What I want to do
is instead of simply calling die I want to know who called new without the
required params. (like a stacktrace) I've tried confess, longmess, and caller
and they did not produce the caller of new.
#!/usr/bin/perl
is loadable.
http://search.cpan.org/~bingos/Module-Load-Conditional-0.54/lib/Module/Load/Conditional.pm
--
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
doing. That way, you could
capture the stdout and stderr separately and log the stderr as WARN or
ERROR.
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
In the following regex what is the t character doing?
$linebuf =~ tr/\n/:/;
--
Ron
**
This e-mail is intended solely for the intended recipient or recipients. If
this e-mail is addressed to you in error or you
I'm looking at documenting perl code I'm working on. I'm considering POD but I
don't
think it can do what I want. Example of what I would like...
[code]
# here I would put POD synopsis etc.
# here I want to put POD that describes this function
sub my_echo
{
my ($str)
();
...
...
# Sometime later in the app show main window again
$mw1-deiconify();
$mw1-raise();
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
($message,$mode,$title)
--
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
to the browser
client, based on some conditions in the logic?
ty.
Rajeev
--
http://search.cpan.org/~markstos/CGI-Session-4.48/lib/CGI/Session.pm
---
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http
= '.template';
--
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Charles Smith wrote:
[snip]
But this pgm fails:
#!/usr/bin/env perl
use Math::Trig;
my $a = \Math::Trig::cos;
$a(0);
Undefined subroutine Math::Trig::cos called at modfunctor line 7.
The cos sub is defined in Math::Complex, which Math::Trig loads.
Try this:
use strict;
use
lina wrote:
Hi,
$ for i in `seq -f '%02g' 1 10` ; do echo $i ; done
01
02
03
04
05
06
07
08
09
10
I wonder how can I get something like above in the perl.
perl -e for (1..10){printf(qq(%02d\n), $_)}
Ron
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional
lina wrote:
On Sun, Mar 11, 2012 at 11:15 PM, Ron Bergin r...@i.frys.com wrote:
lina wrote:
On Sun, Mar 11, 2012 at 10:45 PM, lina lina.lastn...@gmail.com wrote:
What I have come up so far :
#!/usr/bin/env perl
use strict;
use warnings;
my $filename = try.txt;
open my $fh
print $line;
You'll want to skip over the 'A' and 'C' lines before printing the line.
I'll leave that to you.
}
}
Thanks
--
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
I've also found the O'Reilly publications, _CGI programming with Perl_,
and _Programming the Perl DBI_ very helpful.
Shlomi Fish wrote:
Hello Lívio,
On Sun, 22 Jan 2012 13:47:26 +
Lívio Cipriano livio.cipri...@gmail.com wrote:
Hi,
I'm new to Perl but old in other programming
Because this uses *my* environment when I run *your* Perl script.
That's broken.
Hardcode the path. Or install it using any of the module tools, which
will replace #!perl with the proper hardcoded local Perl path.
I also view this as a deployment problem which has probably been solved many
I've had mixed feelings about my
experience on this list so far. I'm sharing these opinions because I
feel it would be awesome if this list seemed friendlier to beginners.
Several years ago I subscribed to this
list and unsubscribed almost as quick as I could. The harshness of
the responses
Can someone explain how to access $InstDesc?? Also please
explain how I would access (that is read from or write to)
to the $Severity scalar on the bottom structure..
Thanks in advance.. flk
Sure I can help. (or guide you astray)
#!/usr/bin/perl
use strict;
use warnings;
my %PlcyActions
I have a class named Widget in a file named Widget.pm. I have another class
named Table in a file called Table.pm. Table extends Widget.
---
package Widget;
#file Widget.pm
#insert a bunch of methods...
---
package Table;
#file Table.pm
use Widget;
@ISA=(Widget);
#insert several methods
I'm trying to add a object to an array of objects. The code below is wrong.
sub add_widget
{
my $self = shift;
my $new_widget = shift;
push ( @($self-{WIDGETS}), $new_widget );
}
Later, I'm going to need to iterate over the array of widgets. How can I
accomplish these 2 tasks?
In a module I have code that looks like this...
sub add_widget
{
my $self = shift;
my $new_widget = shift;
push ( @{$self-{WIDGETS}}, $new_widget );
}
sub get_widgets
{
my $self = shift;
return $self-{WIDGETS};
}
I'm writing a test that is failing at runtime with the
Recently, I was asked to find the first occurrence of a word in a text file and
replace it with an alternate word. This was my solution. As a new Perl
programmer, I feel like this solution was too C like and not enough Perl like.
So, my question is what would have been the Perl like solution
);
}
}
return @some_array;
}
my @some_array = get_some_array (8);
my $comma = ;
for my $ele (@some_array)
{
print $comma . $ele;
$comma = , ;
}
print \n;
--
Ron
This is perl, v5.10.1 (*) built for i686-linux-gnu-thread-multi
Force deleting of read-only files.
/SDelete specified files from all subdirectories.
/QQuiet mode, do not ask if ok to delete on global wildcard
--
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h
folders
plz suggest
From: Ron Bergin r...@i.frys.com
To: Irfan Sayed irfan_sayed2...@yahoo.com
Cc: Shlomi Fish shlo...@shlomifish.org; pa...@laposte.net
pa...@laposte.net; Perl Beginners beginners@perl.org
Sent: Monday, June 27, 2011 8:39 PM
Subject: Re
On Jan 16, 3:52 pm, dpchr...@holgerdanske.com (David Christensen)
wrote:
beginners:
After RTFM, STFW, etc., I realized that print() was issuing a warning
and continuing.
I came up with two solutions:
1. perldoc -f print() states Returns true if successful. So:
print $s @_ or
Ron Bergin wrote:
print $s @_ or die $!;
The downside is that the warning still gets printed:
print() on unopened filehandle NOSUCH at trap-print-errors2.pl
line 12.
And $! isn't very meaningful:
trapped error Bad file descriptor at trap-print-errors2.pl line
12
.
Ron
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Cross thread posted at
http://forums.devshed.com/perl-programming-6/error-opening-csv-file-with-open-function-761095.html
J M wrote:
I was able to figure it out. Here is the update (probably not final) code
for anyone interested:
[code]
#! /usr/bin/perl
#
use DBI;
use DBD::mysql;
use
On Oct 10, 12:59 am, shlo...@iglu.org.il (Shlomi Fish) wrote:
On Sunday 10 October 2010 03:09:21 Ron Bergin wrote:
On Oct 7, 3:07 pm, shlo...@iglu.org.il (Shlomi Fish) wrote:
Hi all,
after being tired of telling Perl newcomers about the same problems with
their code times and times
On Oct 7, 3:07 pm, shlo...@iglu.org.il (Shlomi Fish) wrote:
Hi all,
after being tired of telling Perl newcomers about the same problems with their
code times and times again, I've decided to create this page detailing Perl
Elements to avoid:
http://perl-begin.org/tutorials/bad-elements/
:
C:\TEMPtimestamp.pl
Rate Matt Ron
Matt 162840/s -- -37%
Ron 257003/s 58% --
[r...@099vicidial101 ~]# ./timestamp.pl
Rate Ron Matt
Ron 110132/s -- -29%
Matt 155763/s 41% --
The code:
#!/usr/bin/perl
use strict;
use warnings;
use POSIX qw(strftime);
use
On Jul 26, 5:58 pm, ca...@cajuninc.com (M.Lewis) wrote:
I'm migrating an old RedHat server to a new Debian server. In migrating
the data there's a problem in that on the RH server the UID starts at
500, on the Debian server the UID starts at 1000. Resulting in something
like this:
Old
On Apr 15, 9:21 am, rea...@newsguy.com (Harry Putnam) wrote:
r...@i.frys.com writes:
Here's an example I gave in a similar question in another
forum.
Thanks...
I'm sorry to ask more but if someone asked to be shown an
if/elsif/else construct being replaced by a dispatch table, I don't
#!/usr/bin/perl -wT
#
#sub_test.pl . . .just a proof-of-concept
# to get subroutines to be recognized.
use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $q = new CGI;
#-
#my $con =
On Mar 5, 4:39 pm, dpchr...@holgerdanske.com (David Christensen)
wrote:
Shlomi Fish wrote:
Actually, Strawberry Perl is preferable over AS Perl:
http://strawberryperl.com/
Shlomi,
If using AS, then simply install MinGW which gives you the missing
compiler and proper cpan setup. After that,
On Mar 6, 10:38 am, r...@i.frys.com (Ron Bergin) wrote:
If using AS, then simply install MinGW which gives you the missing
compiler and proper cpan setup. After that, AFAIK you'll have the
same functionality as Strawberry.
http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
On Dec 9, 7:01 am, tony1234567...@yahoo.co.uk (Tony Esposito) wrote:
I need to get the current USER env var in a Windows Perl program. Does
anyone know how this is done? I have done it on UNIX/Linux.
Thx.
perl -e print $ENV{'USERNAME'}
--
To unsubscribe, e-mail:
{
print testScript.pl is not running. I'll start it.\n;
my $pid = fork();
if (!defined($pid)) {
die Could not fork: $!\n;
} elsif ($pid == 0) {
exec(/home/scripts/utils/develop/ron/testScript.pl);
exit;
} else {
waitpid($pid, 0);
}
}
I
:56, Ron Smith
geeksatla...@yahoo.com wrote:
snip
Can't locate object method rvalidate
via package PPM::XML::PPD::html at
C:/strawberry/perl/site/lib/PPM.pm line 16
87.
snip
Odd, I thought the point of Strawberry Perl was to make it
so that
CPAN just worked on Windows and to avoid
:51, Ron Smith
geeksatla...@yahoo.com wrote:
snip
Then when I try installing 'Math::GMP' I get:
snip
WARNING! No GMP libraries were detected!
snip
Warning: No success on
command[C:\strawberry\perl\bin\perl.exe
Makefile.PL]
TURNSTEP/Math-GMP-2.05.tar.gz
snip
The Net::SSH::Perl
Ron Smith wrote:
Hello all,
Hello,
How do you print elements of an array, each on its own
line, in a Windows' console?
I'm doing the following:
E:\My Documentsperl -e use
ExtUtils::Installed; my $inst =
ExtUtils::Installed-new(); my @modules =
$inst-modules(); print
From: Beau E. Cox beau.e@gmail.com
Subject: Re: I'm sure this is a common question, but I can't find the
solution.
To: geeksatla...@yahoo.com
Date: Saturday, March 14, 2009, 10:51 PM
Ron,
On Sat, Mar 14, 2009 at 7:28 PM, Ron Smith
geeksatla...@yahoo.com wrote:
Hello all
this response but didn't come up with
any clear-cut direction.
...any suggestions? I also ran accross the following while searching CPAN:
Net::SSH::W32Perl
MSWin32 compatibility layer for Net::SSH::Perl
Is this also needed; does anyone know where I've gone astray?
Ron Smith
geeksatla...@yahoo.com
::ZipArray::CompareAutoLoaderCPANCPAN::ChecksumsCPAN::DistnameInfo
...etc.
I need:
Archive::Tar
Archive::Zip
Array::CompareAutoLoaderCPAN
CPAN::Checksums
CPAN::DistnameInfo ...etc.
I tried \n, '\n' and a 'foreach' loop, but nothing I do seems to work. ..any
suggestions?
Ron Smith
geeksatla
On Mar 9, 3:37 am, que...@gmail.com (Jerald Sheets) wrote:
On Mar 8, 2009, at 1:29 PM, Ron Bergin wrote:
#!/usr/bin/perl -w
It's better to use the warnings pragma, instead of the -w switch
Another note on this... I just perldoc'ed it to see what it had to say:
DESCRIPTION
On Mar 4, 4:46 am, que...@gmail.com (Jerald Sheets) wrote:
I really think you're doing yourself a disservice by just throwing
your program commands on lines, not indenting according to best
practices. It makes your code unreadable, and can make it very hard
to debug the more involved
`;
if ($process) {
sleep 30} else {
exec (./process name) or print STDERR couldn't exec process name:
$!;
}
}
Ron Smith
geeksatla...@yahoo.com
(213)300-9448
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http
On Feb 27, 9:03 pm, howac...@gmail.com (Howa) wrote:
Hi,
Why sometimes I can use a command to install Perl module, e.g.
perl -MCPAN -e install Digest::MD5
But sometimes can't?
e.g.
perl -MCPAN -e install Archive::Zip
Can't locate object method install via package Archive::Zip at -e
On Feb 3, 12:38 pm, jul.col...@gmail.com (Julien Collas) wrote:
Hi everyone,
I made a script using Net::SSH::Perl and I'm faced to some slow
connexion times.
I use rsa key to connect and it seems to be very slow, but not all the time.
Sometimes it's very quick ( 1sec ), sometimes not (few
On Feb 1, 11:43 pm, psars...@ptc.com (Paryushan Sarsamkar) wrote:
I wanted to print some text on windows cmd in different colors, below is the
code that I am using which works fine on unix but not on windows L
#!/usr/bin/perl
use strict;
use warnings;
use Term::ANSIColor;
print
On Jan 8, 3:56 am, andrew.tayl...@hmrcaspire.com (Andrew Taylor)
wrote:
Hello
I have a script that is (at one point) reading through a file. The file
is processed line by line and each line split into an array like so:
while ($TESTFILE)
{
my $cur_line=$_;
chomp ($cur_line);
while
On Nov 23, 1:17 pm, [EMAIL PROTECTED] (Monnappa Appaiah) wrote:
i forgot to mention that, i'l be running the script from the windows machine
..so pls let me know the module which can login to cisco devices
using ssh, execute certain commands and give me the output.
Thanks,
Monnappa
On Sep 22, 10:16 am, [EMAIL PROTECTED] (Stephen Reese) wrote:
John,
I made many of the changes but what is the addition of the 'next' statement
for? I tried to add the additional code but the script dies mentioning that
it is not terminated correctly. If I comment out the next statement the
On Sep 19, 10:07 pm, [EMAIL PROTECTED] (Stephen Reese) wrote:
I am working on modifying a script that previously parsed Cisco ACL's
and changing it to parse IPS information.
Here is an example of the two log formats.
Sep 19 15:44:29 172.16.2.1 59800: 3725router: Sep 19 19:44:39: %SEC-6-
On Aug 13, 1:44 pm, [EMAIL PROTECTED] wrote:
Hi,
I am trying to search replace a string in a file using the below
perl command on unix.
perl -pi -e 's/OLD/NEW/g' repltest.txt
But I want the above command to display what lines were replaced. Is
it possible using some switch options? If
On Aug 18, 1:03 pm, [EMAIL PROTECTED] (Anjan Purkayastha)
wrote:
hi,
i'm struggling with a hash of arrays problem.
suppose i create the following HOA:
$HOA{$key}= [qw(a,b,c,d)];
I doubt that the results of that assignment is what you want/expect.
#!/usr/bin/perl
#use strict;
use warnings;
that.
eod
When I set the environment variables I have Windows_NT has OS.
So it should work no ?
Happytown a écrit :
On Jul 30, 11:09 am, [EMAIL PROTECTED] (Ron Bergin) wrote:
On Jul 29, 9:12 am, [EMAIL PROTECTED] (Epanda) wrote:
Hi HappyTown
I have seen your web link but I don't
On Jul 29, 9:12 am, [EMAIL PROTECTED] (Epanda) wrote:
Hi HappyTown
I have seen your web link but I don't think it can show me the PID if
I give the name of an existing and running Win NT application.
On 28 juil, 05:24, [EMAIL PROTECTED] (Happytown) wrote:
On Jul 26, 3:14 am, [EMAIL
On Jan 22, 1:31 pm, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
Hi,
Hopefully this appropriate question for this group. I am trying to
redirect to a website:
print $query-redirect(-location=test.cgi?ID=$value, -
method='GET');
Unfortunately the $value never gets passed and I end up with
On Nov 23, 7:26 am, [EMAIL PROTECTED] (Andy) wrote:
Hi,
I am trying to talk to a programmable oven over serial port for heat
testing of a PCB.
I am using ActiveState perl v5.8.8 on Windows XP. I am trying to
install the Win32:SerialPort package using Activestates Perl Package
Manager
On Nov 16, 1:12 pm, [EMAIL PROTECTED] (AndrewMcHorney) wrote:
Hello
I am trying to build a string that contains the following text dir
c:\ /S so I can get a complete directory of all the files on drive C
and put them into an array with the following line of code -
@dir_list = 'dir c:\ /S`;
On Nov 13, 7:11 pm, [EMAIL PROTECTED] (Marco) wrote:
Hi...
Can someone help me on this? Actually I can get the dara from the
system()...But it shows 0 when I print the $result...How can I
assign the system() to $result ?Thanks...
here below is the code...
$inact = cat /proc/meminfo |
On Nov 13, 7:11 pm, [EMAIL PROTECTED] (Marco) wrote:
Hi...
Can someone help me on this? Actually I can get the dara from the
system()...But it shows 0 when I print the $result...How can I
assign the system() to $result ?Thanks...
here below is the code...
$inact = cat /proc/meminfo |
On Nov 2, 6:06 am, [EMAIL PROTECTED] (Lerameur) wrote:
On Nov 1, 9:29 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote:
On 11/1/07, lerameur [EMAIL PROTECTED] wrote:
I wrote a small script, the manual upload of a file works, but gives
me an error message:unable to initialize mechanism
On Oct 30, 6:50 pm, [EMAIL PROTECTED] (Howa) wrote:
On 10 30 , 9 38 , [EMAIL PROTECTED] (Ron Bergin) wrote:
On Oct 30, 3:34 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
In addition to changing 'my' to our' in Config.pl, you'll also need to
add the 'our $value;' to Script.pl
yes you
On Oct 29, 11:09 am, [EMAIL PROTECTED] (John W . Krahn) wrote:
On Monday 29 October 2007 06:42, Mike Tran wrote:
Hey all,
Hello,
I'm new with Perl and need help with this simple script. I'm still
playing around with the script below to get a feel for Perl. My
script below is
On Oct 29, 8:25 pm, [EMAIL PROTECTED] (Kaushal Shriyan) wrote:
Hi
I am referring to perldoc perlintro
my %fruit_color = (apple, red, banana, yellow);
You can use whitespace and the = operator to lay them out more nicely:
my %fruit_color = (
apple = red,
On Oct 30, 3:34 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
On 10/30/07, howa [EMAIL PROTECTED] wrote:
Consider the example below...
Config.pl
==
#!/usr/bin/perl -w
my $value = abc;
change 'my' to 'our'.
1;
Script.pl
==
require Config.pl;
In addition to changing
On Oct 30, 7:50 am, [EMAIL PROTECTED] (Paul Lalli) wrote:
On Oct 30, 9:38 am, [EMAIL PROTECTED] (Ron Bergin) wrote:
On 10/30/07, howa [EMAIL PROTECTED] wrote:
Consider the example below...
Config.pl
==
#!/usr/bin/perl -w
my $value = abc;
In addition to changing
On Oct 29, 6:42 am, [EMAIL PROTECTED] (Mike Tran) wrote:
Hey all,
I'm new with Perl and need help with this simple script. I'm still
playing around with the script below to get a feel for Perl. My script
below is incomplete and I'm doing an array within an array which is
incorrect. Please
On Oct 25, 9:38 pm, [EMAIL PROTECTED] (mAyur) wrote:
On Oct 23, 6:55 pm, [EMAIL PROTECTED] (Paul Lalli) wrote:
On Oct 22, 3:27 pm, [EMAIL PROTECTED] (Ayesha) wrote:
Hi all
I wrote this code to read a file (in the same directory as the script)
on Win XP
On Oct 23, 6:57 am, [EMAIL PROTECTED] (Paul Lalli) wrote:
On Oct 23, 12:27 am, [EMAIL PROTECTED] (Ayesha) wrote:
I was not in the right directory, but I learnt about forward and
backward slashed also. Thanks to all who replied
Arg. This is exactly what I was afraid of. The post about
On Oct 23, 6:57 am, [EMAIL PROTECTED] (Paul Lalli) wrote:
On Oct 23, 12:27 am, [EMAIL PROTECTED] (Ayesha) wrote:
I was not in the right directory, but I learnt about forward and
backward slashed also. Thanks to all who replied
Arg. This is exactly what I was afraid of. The post about
On Oct 22, 1:52 am, [EMAIL PROTECTED] (Anand Shankar) wrote:
Hi,
I would like to replace a part of a really big (4GB) text file. And
the contents that I want to change is really a small but continuous
portion. Could some one please help me with the best way I can do this
in perl?
Thanks,
On Oct 25, 1:59 am, [EMAIL PROTECTED] (Irfan Sayed) wrote:
Hi All,
I have one array say my @test=(1,2,3,4,5);
if I print this array it will print like this
print @test\n;
and the output is
1 2 3 4 5
now my req. is that I want to store these array values in another array
in such a fashion
On Oct 11, 2:37 am, [EMAIL PROTECTED] (PeiYu Zeng) wrote:
Hello,
Can I modify the contents of a file, without creating a new one?
Now, the method that I modify the contents of a file is:
open( READHANDLE , sourceFile );
open( WRITEHANDLE, destiFile );
foreach my $line
On Oct 11, 4:25 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
2007/10/11, PeiYu Zeng [EMAIL PROTECTED]:
Hello,
Can I modify the contents of a file, without creating a new one?
Yes.You can use perl one-liner to do that,
perl -pi.bak -e 'modify the current line if it match some conditions'
On Sep 24, 8:38 pm, [EMAIL PROTECTED] wrote:
I'm using html::tokeparser::simple and will next place desired data
into hashes, but I'm having problems getting to the individual pieces
of data.
After using html::tokeparser::simple, then using a regex and pushing
data into a new array, I can't
On Sep 8, 4:52 pm, [EMAIL PROTECTED] wrote:
How would I make a script that gets a list of all the computer names
and ip addresses, internal 192.168..., of the computers attached to my
wired network? Or is there a program that will do this already? Thanks
The program that you're looking for is
On Sep 9, 11:56 am, [EMAIL PROTECTED] wrote:
On Sep 9, 8:46 am, [EMAIL PROTECTED] (Ken Foskey) wrote:
On Sat, 2007-09-08 at 16:52 -0700, [EMAIL PROTECTED] wrote:
How would I make a script that gets a list of all the computer names
and ip addresses, internal 192.168..., of the computers
On Sep 1, 5:03 pm, [EMAIL PROTECTED] (Rodrigo Tavares) wrote:
Hello,
I have a problem with a counter.
#!/usr/bin/perl
use strict;
use warnings;
print Write a number:;
my $number= STDIN;
my @array;
my $div = $number * 2 ;
my $i=0;
while ($div 0)
{
$div = $div / 2;
On Aug 31, 6:05 pm, [EMAIL PROTECTED] (Chris E. Rempola) wrote:
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2007 17:00:47
On Aug 31, 6:05 pm, [EMAIL PROTECTED] (Chris E. Rempola) wrote:
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2007 17:00:47
1 - 100 of 321 matches
Mail list logo