g
Cc: "Ron Bergin"
Sent: Tuesday, July 7, 2015 7:41:34 AM
Subject: Re: Debugging and passing constant value at run time
On Tue, 7 Jul 2015 07:27:49 -0700 (PDT)
Ron Bergin wrote:
> Using a DEBUG constant and assigning its value via an environment
> variable are both common, but has a
Using a DEBUG constant and assigning its value via an environment variable are
both common, but has a drawback and would not be my choice of approach. I
prefer to use a lexical var (with file scope) and assign it via command line
option.
Let's assume you have multiple scripts using the DEBUG c
ou say about this:
> $foo.=substr($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
--
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 erro
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::$
$foo = MyFoo::{$pgm}Bar->new;
> â¦
> }
>
> 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::
#x27;t use a slice at all:
>
> perl -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 slic
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';
[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:
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 unsubscrib
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
'996',
'997',
'998',
'999'
]
];
The Zip Codes of CA are
$VAR1 = [
[
'95122',
'95035',
'95112'
]
];
--
Ron Bergin
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
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;
>
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 |
> ---
Bill McCormick wrote:
> On 2/25/2014 4:30 PM, Bill McCormick wrote:
>> What would be the perl'ish way using map or some other sugar to check if
>> a list of values meet some criteria? Instead of doing something like
>>
>> my @issues = qq(123,456,a45);
>> my $max = 999;
>>
>> for (@issues) {
>>d
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 scr
ional
to test if the desired version 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/
#x27; at ./test02.pl line 20
>
>
> close does not fail if the command is ok, e.g. 'uname -a'. Can anybody
> explain to me why close fails in the example above?
>
>
>
> --
> Thanks,
> Manfred
If you test the return code of the close call, you'll see that it
the Perforce client name:"
>> Â Â Â Â Â Â )->pack(-anchor=>'center');
>> Â Â Â Â Â Â
>
>
You're looking for the ->withdraw()method.
# Hide main window
$mw1->withdraw();
...
...
# 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/
ge,$mode,$title)
That line (1370) should be:
my $_ret = Win32::MsgBox($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/
generate page using tt
>
> 2. another related issue is: How do I send a redirect URL 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
--
e"
);
my ($name,$path,$suffix) = fileparse($templates[1], '.template');
print Dumper ($name,$path,$suffix);
outputs:
$VAR1 = 'file2';
$VAR2 = '/a/b/c/d/e/f/';
$VAR3 = '.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;
us
>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.
lina wrote:
> On Sun, Mar 11, 2012 at 11:15 PM, Ron Bergin wrote:
>> lina wrote:
>>> On Sun, Mar 11, 2012 at 10:45 PM, lina wrote:
>>>
>>> What I have come up so far :
>>>
>>> #!/usr/bin/env perl
>>>
>>> use strict;
lt;', $filename or die "Couldn't read $filename";
You should include the reason it failed in the die statement.
open my $fh, '<', $filename or die "Couldn't read $filename <$!>";
>
>
>
> while (my $line = <$fh>){
> if
es are getting deleted and not empty folders
>
> plz suggest
>
>
>
>
>
> From: Ron Bergin
> To: Irfan Sayed
> Cc: Shlomi Fish ; "pa...@laposte.net"
> ; Perl Beginners
> Sent: Monday, June 27, 2011 8:39 PM
> Subject:
e the /s and /q and /f options.
/FForce 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
F
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:
>>
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
Jeff Peng wrote:
> Hi,
>
> I have intalled activeperl 5.10 on windows and try to install a perl
> package.
> But I can't find the package in activeperl's "perl package manager"
> though this package does exist in CPAN.
> Also my windows doesn't have gcc/gmake installed.
> So how to install this kin
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;
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
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-eleme
While doing some benchmark testing on both Windows and Linux, the
results of the exact same code was reversed. A slight difference in
the percentages is understandable, but I fail to see why the results
would be reversed. Could someone shed some light on this issue?
First the benchmark results:
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
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:
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 th
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: beginners-unsubscr..
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 jus
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 involv
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
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 (f
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;
>
> p
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_
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,
> Monna
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 t
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 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
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 opti
Process::Info ();'. Please do not do 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,
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, [EMAI
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 e
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
> Manage
On Nov 22, 6:57 am, [EMAIL PROTECTED] (Avinashsuratkal)
wrote:
>
> In short I need to read the text between 2 lines, which can be
> incorporated in the perl script, but not a one-liner.
>
> Thanks,
If my interpretation of your needs is correct, then this will do the
job.
#!/usr/bin/perl
use stri
On Nov 22, 6:57 am, [EMAIL PROTECTED] (Avinashsuratkal)
wrote:
> On Nov 22, 2:22 pm, [EMAIL PROTECTED] (Avinashsuratkal)
> wrote:
>
>
>
> > On Nov 22, 2:27 am, [EMAIL PROTECTED] (Yitzle) wrote:
>
> > > On Nov 21, 2007 11:28 AM, avinashsuratkal <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I ha
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:\
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
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
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 me
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
>
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
> > &g
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 "Con
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 = (
>
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
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. Plea
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 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 suc
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?
>
> Th
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 ab
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 ab
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 con
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 $
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 c
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 co
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 i
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:0
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:0
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= ;
>
> my @array;
> my $div = $number * 2 ;
> my $i=0;
>
> while ($div > 0)
> {
> $div = $div
On Aug 28, 10:10 pm, [EMAIL PROTECTED] (Omega -1911) wrote:
> Ha! Here is a snippet that I use on a windows machine. It works!!!
>
> use File::Find;
>
> sub rm();
> $count = 0;
> @directories = ("F://Hindi/RHTDM");
> find(\&rm, @directories);
>
> sub rm() {
> $count++;
> my ($filename) = $_;
> if (
On Aug 28, 10:10 pm, [EMAIL PROTECTED] (Omega -1911) wrote:
> Ha! Here is a snippet that I use on a windows machine. It works!!!
>
> use File::Find;
>
> sub rm();
> $count = 0;
> @directories = ("F://Hindi/RHTDM");
> find(\&rm, @directories);
>
> sub rm() {
> $count++;
> my ($filename) = $_;
> if (
81 matches
Mail list logo