Another way to skip the DOS command prompt is to interprete your Perl
script using
wperl.exe instead of perl.exe.
- Gilbert LE HUU HOA -
Focal Systems
Paris
Sumit_Babu@i2
Hello Rajeev,
If you just want to hide the DOS console then you can use the following at
the beginning of the script to hide it:
use Win32::GUI; BEGIN
{Win32::GUI::Hide(scalar(Win32::GUI::GetPerlWindow()))};
OR
If you want to run the script as a Windows service t
Hi,
I have a perl script which runs as server/demon and needs to be runing always.
currently I am starting the script using a batch file. But doing this it pops up a
window. and if some user closes the window the script stops. Also the pop up window
is bit annoying and it makes no sense for
On 6/4/02 10:26 PM, "Adam Vardy" <[EMAIL PROTECTED]> wrote:
> Can someone help please. I'm learning from scratch. What is this?
>
> $_='My email address is <[EMAIL PROTECTED]>.';
Sets the magical Perl variable $_ to equal the scalar value:
My email address is <[EMAIL PROTECTED]>
> /(<.*
Adam --
...and then Adam Vardy said...
%
% Can someone help please. I'm learning from scratch. What is this?
I can try...
%
% $_='My email address is <[EMAIL PROTECTED]>.';
This is an assignment statement (see, there is another command!). It
sets the $_ variable, which is the standard "w
drieux, et al --
I promise that I can keep this on topic, folks...
...and then drieux said...
%
% On Tuesday, June 4, 2002, at 04:58 , David T-G wrote:
%
% volks,
%
% the reason that the grass is moving around, is
% not that there is an earthquake, merely that the elephants
% are dancing the
Can someone help please. I'm learning from scratch. What is this?
$_='My email address is <[EMAIL PROTECTED]>.';
/(<.*>)/i;
print "Found it ! $1\n";
I can only identify one command here. Print. How does this 'program'
run?
--
Adam V.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
On Tuesday, June 4, 2002, at 04:58 , David T-G wrote:
volks,
the reason that the grass is moving around, is
not that there is an earthquake, merely that the elephants
are dancing the polka here - nothing serious
[..]
> % the fine person wanted something more on the order of
> %
> % my
On Tuesday, June 4, 2002, at 04:44 , David T-G wrote:
> % or am I missing something in the voodoo
>
> I hope so, because if you aren't then I am :-)
I like SO SUCK[1]..
my $PING1='SPAGO';
print "And it is now $PING1 \n";
my $word = " fred 12 spot 345 67 bax 89%
Hi, all --
...and then David T-G said...
%
...
% I have perl, the camel book, and a keyboard :-) I'll surf around on
% CPAN, but can anyone point me to some good places to look to learn about
% this sort of thing?
Thanks for the many and varied suggestions, and I'm sorry I wasn't more
clear.
drieux, et al --
...and then drieux said...
%
% On Tuesday, June 4, 2002, at 03:17 , David T-G wrote:
% [..]
% >
% >You should be able to split on colons...
% >
% > [zero] [5:16pm] ~> perl -e 'foreach $p \
% >(split (/:/,$ENV{PATH})){print "$p\n"}'
%
% first off my complements on the skan
drieux, et al --
...and then drieux said...
%
% On Tuesday, June 4, 2002, at 02:38 , John W. Krahn wrote:
% [..]
...
% >>( $PING1 = $_ ) =~ s/\D+//g;
% >
% >Sorry, missed a step. :-)
% >
% > ( $PING1 = (split)[6] ) =~ s/\D+//g;
...
% but notice that your first one squeez
On Tuesday, June 4, 2002, at 03:17 , David T-G wrote:
[..]
>
> You should be able to split on colons...
>
> [zero] [5:16pm] ~> perl -e 'foreach $p \
> (split (/:/,$ENV{PATH})){print "$p\n"}'
first off my complements on the skank - although you know and I know
the fine person wanted someth
I use this online reference to double check my SQL syntax (no pun intended) and data
types:
http://www.mysql.com/documentation/mysql/bychapter/manual_toc.html
Especially: "6 MySQL Language Reference"
AFA perl, use DBI.
=-= Robert Thompson
On Tue, Jun 04, 2002 at 05:26:24PM -0500, David T-G
On Tuesday, June 4, 2002, at 02:38 , John W. Krahn wrote:
[..]
>> #!/usr/bin/perl
>> @SERVERS = qw(itsux17 its29 itsux24 int-dns1 int-dns2 mrtg defgtway);
>> for $S ( @SERVERS ) {
>> for ( `/etc/ping $S 32 -n 6` ) {
>> if ( /trans/ ) {
>> ( $PING1 = $_ ) =~ s/\D+//g;
>
> S
Hi, all --
I figure it's time I buckle down and try to crank out some code, and
so putting my MP3 collection data into a mysql database seems a worthy
challenge. I'll need to do some database stuff like come up with a
structure and some relations and then put the data in and get it out.
I have
James --
...and then James Kelty said...
%
% Hello.
Hello!
%
% I am writing a quick script in order to parse a users $PATH variable, but I
% hit upon a quandry.
%
% The PATH environment is one long string with element separated by a ":", no
% mystery there, but
% how would I look at each in
Pat --
...and then [EMAIL PROTECTED] said...
%
% Hello:
% Anyone know how to remotely connect using Perl?
% I am quite used to using unix commands like rsh and rlogin, just
% wondering how I might 'simply' do this in Perl.
Almost certainly the Net::Telnet module is what you want.
%
% - Pat
%
On Tuesday, June 4, 2002, at 02:55 , <[EMAIL PROTECTED]> wrote:
> Hello:
> Anyone know how to remotely connect using Perl?
> I am quite used to using unix commands like rsh and rlogin, just
> wondering how I might 'simply' do this in Perl.
perldoc Net::Telnet
remember that 'rlogin/rsh' are ugl
Hello.
I am writing a quick script in order to parse a users $PATH variable, but I
hit upon a quandry.
The PATH environment is one long string with element separated by a ":", no
mystery there, but
how would I look at each individual element? Normally I would use split on a
line by line basis, b
Hello:
Anyone know how to remotely connect using Perl?
I am quite used to using unix commands like rsh and rlogin, just
wondering how I might 'simply' do this in Perl.
- Pat
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
"John W. Krahn" wrote:
>
> [EMAIL PROTECTED] wrote:
> >
> > ive got a simple sh script that pings machines on my network segment.
> >
> > very new to perl, could folx on the list give me some hints/pointers to how
> > to make this shell
> > script into a perl one?
> >
> > !/usr/bin/sh
> > SERVERS
[EMAIL PROTECTED] wrote:
>
> ive got a simple sh script that pings machines on my network segment.
>
> very new to perl, could folx on the list give me some hints/pointers to how
> to make this shell
> script into a perl one?
>
> !/usr/bin/sh
> SERVERS="itsux17 its29 itsux24 int-dns1 int-dns2 m
On Tuesday, June 4, 2002, at 01:01 , <[EMAIL PROTECTED]> wrote:
[..]
> !/usr/bin/sh
> SERVERS="itsux17 its29 itsux24 int-dns1 int-dns2 mrtg defgtway"
> for S in $SERVERS
> do
> PING1=`/etc/ping $S 32 -n 6 | grep trans | awk '{print $7}' | cut
> -d"%" -f1`
> if [ $PING1 -gt 25 ]; t
ive got a simple sh script that pings machines on my network segment.
very new to perl, could folx on the list give me some hints/pointers to how
to make this shell
script into a perl one?
!/usr/bin/sh
SERVERS="itsux17 its29 itsux24 int-dns1 int-dns2 mrtg defgtway"
for S in $SERVERS
do
> -Original Message-
> From: Robert Thompson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 3:38 PM
> To: [EMAIL PROTECTED]
> Subject: Passing array to subroutine problem
>
>
> Hello,
>
> I have a subroutine where I want to pass some
> paramaters to it, but assign defa
Hello,
I have a subroutine where I want to pass some paramaters to it, but assign
default ones if a paramater is not passed. This is similar to CGI.
&mySub( -param1=>'my value', -param3=>'value' ); # -param2 would get a default
value
The problem I am running into is if
Thanks. It turns out that wasn't my problem at all. I had a \n
character midway through and I didn't know about /gs for those
characters. It was the data, not the code.
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 2:54 PM
To: Barry Jone
> -Original Message-
> From: David T-G [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 2:51 PM
> To: perl beginners
> Cc: Bob Showalter
> Subject: Re: printing key codes
>
> ...
>
> %
> % Then you can just refer to F1 as K_F1, etc.
>
> Hmmm... Any codes for shifted, controlle
> -Original Message-
> From: Barry Jones [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 1:15 PM
> To: Beginners @ Perl (E-mail)
> Subject: Escaping characters
>
>
> Hi,
> I'm trying to do a patter match for everything contained within
> {{ stuff }}. Now I've gotten th
Bob, et al --
...and then Bob Showalter said...
%
% > -Original Message-
% > From: David T-G [mailto:[EMAIL PROTECTED]]
...
% >
% > Is there a simple way to get perl to spit out one line per incoming
% > keycode? That is, get it to spit out
% >
% > 27, 79, 80
% > 27, 91, 50, 51, 1
> -Original Message-
> From: David T-G [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 1:04 PM
> To: perl beginners
> Cc: Bob Showalter
> Subject: Re: printing key codes
>
>
> Bob, et al --
>
> ...and then Bob Showalter said...
> %
> % > -Original Message-
> % > From:
Stefan Haberer wrote:
>
> hi guys,
> I would like to split a line like that
>
> # FRI MAY 02
>
> in two parts:
>
> $bash = #
> $rest = FRI MAY
>
> in my version ($bash, $rest) = split(/\s/, $line);
>
> $rest only contains "FRI" because the line is splitted at every blank. how can
Ned Cunningham wrote at Tue, 04 Jun 2002 20:16:46 +0200:
> It's a pipe delimited txt file.
>
Examples always help us.
I assume your file looks like
key1|value1
key2|value2
...
keyn|valuen
Then you should try:
open FILE, "<$filename" or die "Can't open $filename: $!";
my %hash = map {chomp; sp
hi-
just did some work w/ a pipe-delimited file:
assuming that you've already cleaned the data to make sure that there are
no random pipes in there, something like the following should work:
open(NEW, "$cwd/txt/new.txt") or die "couldn't open new.txt";
while ($line = ) {
chomp($line);
It's a pipe delimited txt file.
-Original Message-
From: Kipp, James [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 2:15 PM
To: '[EMAIL PROTECTED]'
Subject:RE: Read a file into a Hash
how is the file laid out?
-Original Message-
From: Ned Cunningham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 2:02 PM
To: '[EMAIL PROTECTED]'
Subject: Read a file into a Hash
I am trying to traverse a file and match the key to a key in a second
file...
How do I put the file
I am trying to traverse a file and match the key to a key in a second
file...
How do I put the file into the Hash???
%hash = "c:/file.txt";
I cant seem to find the magic here..
TIA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
on Tue, 04 Jun 2002 17:14:54 GMT, Barry Jones wrote:
> Hi,
> I'm trying to do a patter match for everything contained within
> {{ stuff }}. Now I've gotten this to work just fine with ** stuff **,
> ^^ and a several others, but I can't get curly braces to work and I have
> no idea why. I'v
Bob,
Many thanks - I'll look into it.
Mark
> -Original Message-
> From: Bob Showalter [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 9:22 AM
> To: 'HENRY,MARK (HP-Roseville,ex1)'; '[EMAIL PROTECTED]'
> Subject: RE: avoiding 2nd process
>
>
> > -Original Message-
> >
Hey ppriest,
My MUA believes you used Internet Mail Service (5.5.2653.19)
to write the following on Tuesday, June 4, 2002 at 1:38:41 PM.
pic> Unix Sys administrator, versed in most shells, ksh, bourne, bash
pic> etc.
pic> What is the best way for me to lean perl?
Learning Perl, 3rd Edition fro
Phil --
...and then [EMAIL PROTECTED] said...
%
% Unix Sys administrator, versed in most shells, ksh, bourne, bash etc.
Sounds familiar...
%
% What is the best way for me to lean perl?
Up against a sturdy wall, preferably at an angle of 45 to 65 degrees.
Meanwhile, go and get the camel boo
Cut off the fat.
>
> Unix Sys administrator, versed in most shells, ksh, bourne, bash etc.
>
> What is the best way for me to lean perl?
>
> Phil
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Unix Sys administrator, versed in most shells, ksh, bourne, bash etc.
What is the best way for me to lean perl?
Phil
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Jeff --
...and then Jeff 'japhy' Pinyan said...
%
% On Jun 4, David T-G said:
%
% >%perl -lpe '$_ = join ", ", unpack("c*", $_)'
% >
% >Is there a simple way to get perl to spit out one line per incoming
...
% >when it sees F1 followed by Shf-F1 without a newline between them?
%
% You run
On Jun 4, David T-G said:
>Bob, et al --
>%
>%perl -lpe '$_ = join ", ", unpack("c*", $_)'
>
>Is there a simple way to get perl to spit out one line per incoming
>keycode? That is, get it to spit out
>
> 27, 79, 80
> 27, 91, 50, 51, 126
>
>when it sees F1 followed by Shf-F1 without a newl
Hi,
I'm trying to do a patter match for everything contained within
{{ stuff }}. Now I've gotten this to work just fine with ** stuff **,
^^ and a several others, but I can't get curly braces to work and I have
no idea why. I've tried escaping them with \ and not doing and what
have you
Bob, et al --
...and then Bob Showalter said...
%
% > -Original Message-
% > From: David T-G [mailto:[EMAIL PROTECTED]]
...
% > which will read stdin, spit out the key codes it gets until a
...
%
% How 'bout:
%
%perl -lpe '$_ = join ", ", unpack("c*", $_)'
Aha! So I need to go a
> -Original Message-
> From: David T-G [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 12:48 PM
> To: perl beginners
> Subject: printing key codes
>
>
> Hi, all --
>
> It seems like it should be a very easy thing to whip up a
> perl one-liner
> which will read stdin, spit out
Thanks to John W Krahn and Shishir for your replys, need to learn about
push
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi, all --
It seems like it should be a very easy thing to whip up a perl one-liner
which will read stdin, spit out the key codes it gets until a ctrl-D, and
then quit; something like
perl -e 'while (<>) { print SomeMagicHere . \n; }
would probably do it. But what is the magic part? How do
On Jun 4, Sven Bentlage said:
>using the code below I only get the last line from the file.
Let's look at your loops:
while () {
@user = split /;/;
}
That loops over each line of the file, splits the line on semicolons, and
sets the @user array to that list returned. You are OVERWRITI
> -Original Message-
> From: HENRY,MARK (HP-Roseville,ex1) [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 12:15 PM
> To: '[EMAIL PROTECTED]'
> Cc: HENRY,MARK (HP-Roseville,ex1)
> Subject: avoiding 2nd process
>
>
> All,
>
> Wondering what the best approach would be to the fol
All,
Wondering what the best approach would be to the following.
I have a script which copies files and sends mail notification
appropriately.
I want the script to check for new source files every 15 mins, however when
there are new files, the operation will take long enough to the point where
Hi
using the code below I only get the last line from the file.
Can anybody tell me what I'm doing wrong?
(The empty lines do not change anything..)
Thanks for your help
Sven
file:
John;123
Jane;456
Ed;789
code:
open(USER,"<$user_access_file") or die
>try:
>--
>#!/usr/bin/perl
>
>$date = `date +%y%m%e`;
>$backup_dest = "/backup/home/" . "$date" . "-monthly";
>$archive_dest = "/backup/home/archives/" . "$date" . "-monthly";
>$backup_target = "/home/";
>$level = '0';
>
>$cmd = "dump -$level -u -A $archive_dest -f $backup_dest -j 9
>$backup_targ
On Jun 4, Kipp, James said:
>$date = `date +%y%m%e`;
>$backup_dest = "/backup/home/" . "$date" . "-monthly";
Needless quoting of $date, and there's no reason to separate $date from
the rest of the string:
$backup_dest = "/backup/home/$date-monthly";
>$archive_dest = "/backup/home/archives/"
On Jun 4, Mat Harris said:
>I want to issue the command to the command line, including the values of
>these vars. I have tried backticking and the system('command here') but
>they just send the vars as empty strings.
Here's the program:
#!/usr/bin/perl
$date = `date +%y%m%e`;
$backup_d
try:
--
#!/usr/bin/perl
$date = `date +%y%m%e`;
$backup_dest = "/backup/home/" . "$date" . "-monthly";
$archive_dest = "/backup/home/archives/" . "$date" . "-monthly";
$backup_target = "/home/";
$level = '0';
$cmd = "dump -$level -u -A $archive_dest -f $backup_dest -j 9
$backup_target";
system
i am writing a perl script to run as a cron job and backup my files using dump.
i have defined vars containing stuff like backup target, level of backup
and so on.
I want to issue the command to the command line, including the values of
these vars. I have tried backticking and the system('comm
On Tuesday, June 4, 2002, at 07:46 , Theuerkorn Johannes wrote:
> Thanks for support, found an easy to use mod in cpan: http://search.cpan.
> org/search?mode=module&query=XML called XML-QL which seems to do just
> what i need.
always remember:
"If It works for YOU
it
On Tuesday, June 4, 2002, at 05:33 , William West wrote:
[..]
> i would like to know what is needed for perl
> to 1) interface with any third party database
The simplest solution is to use the generic sorts
of DB queries you can construct in say SQL - but I
fear that these folks may not be exp
Thanks for support, found an easy to use mod in cpan:
http://search.cpan.org/search?mode=module&query=XML called XML-QL which seems to do
just what i need.
Wasn´t able to work through your example at wetware until now.
Johannes
> -Ursprüngliche Nachricht-
> Von: drieux [SMTP:[EMAIL P
On Jun 4, Trevor Nichols said:
>I've got two machines here which are pretty crappy but there seems to be
>something seriously wrong somewhere. One machine, a Pentium 200 MMX
>with 80MB ram runs a very simple script taking 5 seconds.
>
>t@data:~$ cat test.pl
>use diagnostics;
>use strict;
>
>prin
> I've got two machines here which are pretty crappy but there seems to be
> something seriously wrong somewhere. One machine, a Pentium 200 MMX
> with 80MB ram runs a very simple script taking 5 seconds.
*Drool*
I have three 486/66 machines with 16Mb ram, that are on my home LAN. I log
into t
James Kipp wrote at Tue, 04 Jun 2002 16:24:04 +0200:
> ...
> here is some code:
> --
> use File::Find;
> find (\&wanted_user, "$dir");
>
> sub wanted_user
> {
> %sum = ();
> next unless (-d $_);
> ($user,$size) = (stat($_))[4,7] or die "can't stat: $!\n"; push (
On Tuesday, June 4, 2002, at 06:27 , Richard Adams wrote:
[..]
> The fog has lifted and all has become clear...
[..]
my complements to bob for the as expected excellent outline
of the basics about lexical scoping.
the other obligatory read is:
http://perl.plover.com/FAQs/Namespaces.htm
i am writing a script that does a number os usage and space checking
routines. having trouble with one of them.
the plan here is to recurse thru a directory, record each uniqe user and add
the size of the directories per user and then spit out a total like this:
UserTotal usage in /s
> -Original Message-
> From: Trevor Nichols [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 9:53 AM
> To: [EMAIL PROTECTED]
> Subject: Slow script
>
>
> Hi All,
>
> I've got two machines here which are pretty crappy but there
> seems to be
> something seriously wrong somewher
Trevor Nichols wrote at Tue, 04 Jun 2002 15:52:38 +0200:
> I've got two machines here which are pretty crappy but there seems to be something
>seriously wrong
> somewhere. One machine, a Pentium 200 MMX with 80MB ram runs a very simple script
>taking 5
> seconds.
>
> t@data:~$ cat test.pl
> u
Hi,
This is indeed much faster, just substitute the last directory off of the path
when you're done checking with the current.
Looks better indeed !!
Nikola,
using File::find searches all the files and as the directory's can hold many
files and directory's I prefer to just do the test on 1 fil
Hi All,
I've got two machines here which are pretty crappy but there seems to be
something seriously wrong somewhere. One machine, a Pentium 200 MMX
with 80MB ram runs a very simple script taking 5 seconds.
t@data:~$ cat test.pl
use diagnostics;
use strict;
print "hi\n";
t@data:~$ time
Rohesia Hamilton Metcalfe wrote at Thu, 30 May 2002 17:28:45 +0200:
> #make array of cgi-scripts:
> @Scripts=("f-.cgi", "f-bb.cgi", "f-.cgi", "f-.cgi", "f-ee.cgi",
> "f-ff.cgi");
>
> # pick one at random
> srand;
> $RandomScript = $Scripts[int(rand(@Scripts))];
>
I agre
Ying Liu wrote at Mon, 03 Jun 2002 17:11:22 +0200:
> Is there a good method to do this? I need to remove the stop words from the comment
>field of every
> record. There are about 20,000 records. The comments look like this:
>
> Yersinia pestis strain Nepal (aka CDC 516 or 369 isolated from huma
> Is there a good method to do this? I need to remove the stop
> words from the comment field of every record. There are about
> 20,000 records. The comments look like this:
>
> Yersinia pestis strain Nepal (aka CDC 516 or 369 isolated
> from human) 16S-23S in tergenic region amplified with 1
Many thanks,
The fog has lifted and all has become clear...
Richard
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> -Original Message-
> From: David vd Geer Inhuur tbv IPlib
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 9:05 AM
> To: [EMAIL PROTECTED]
> Subject: skip first array entry and exit foreach loop only
>
>
>
> Hi,
>
> I am looking for a nice solution for the following proble
use File::Find and turn on the option 'bydepth';
http://search.cpan.org/doc/GSAR/perl-5.6.1-TRIAL3/lib/File/Find.pm
> -Original Message-
> From: David vd Geer Inhuur tbv IPlib
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 9:05 AM
> To: [EMAIL PROTECTED]
> Subject: skip firs
> -Original Message-
> From: Richard Adams [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 6:13 AM
> To: [EMAIL PROTECTED]
> Subject: Use of our
>
>
> Hi,
> I'm sure this has been asked before, but I'm having a problem with
> understanding "our".
>
> I get the idea of my, and
You will not get any help if you don't detail your problem on the list.
Everyone here is a volunteer, if you think someone is going to run after you
trying to find out what your problem is then you're wrong.
Rather e-mail the list with details of what problem you're experiencing in
as much detail
Hi,
I am looking for a nice solution for the following problem :
I have a directory stored in $header. I need to seek each directory for a specific
file, but I have to start in the deepest dir and than go upwards. Using the split
@header first value is always empty as it is splitting on " */*".
i would like to know what is needed for perl
to 1) interface with any third party database
but mainly
2) interface with progress.
now, i'm not worried about getting a tutorial- just a
way to start... (tried using google and CPAN but
haven't been able to get good results (probably my lack
o
Sudarsan, et al --
...and then Sudarsan Raghavan said...
%
% > ($bash, ($rest)) = split(/\s/, $line);
%
% $rest will still only contain 'FRI'. This is the same as
% my ($a) = (1, 2, 3, 4);
% $a becomes 1 after this 2, 3, 4 are just ignored
*sigh* Well, thanks for the clarification (how did
>
>
> ($bash, ($rest)) = split(/\s/, $line);
$rest will still only contain 'FRI'. This is the same as
my ($a) = (1, 2, 3, 4);
$a becomes 1 after this 2, 3, 4 are just ignored
>
>
> to force the slurp and then dump it into a string. Try 'em both; neither
> is tested.
>
--
To unsubscribe, e
[EMAIL PROTECTED] wrote:
> hi guys,
> I would like to split a line like that
>
> # FRI MAY 02
>
> in two parts:
>
> $bash = #
> $rest = FRI MAY
>
> in my version ($bash, $rest) = split(/\s/, $line);
Change this line to
($bash, $rest) = split (/\s/, $line, 2);
perldoc -f split
>
>
>
Hello stefan,
You will need just a basic regex, not a split
my $string='# FRI MAY 02';
$string=/(.*?)\s+(.*)/;
my $bash=$1;
my $rest=$2;
Shawn
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 04, 2002 6:49 AM
Subject: split
hi guys,
Stefan --
...and then [EMAIL PROTECTED] said...
%
% hi guys,
% I would like to split a line like that
%
% # FRI MAY 02
%
% in two parts:
%
% $bash = #
% $rest = FRI MAY
Hokay...
%
%
% in my version ($bash, $rest) = split(/\s/, $line);
%
% $rest only contains "FRI" because the
hi guys,
I would like to split a line like that
# FRI MAY 02
in two parts:
$bash = #
$rest = FRI MAY
in my version ($bash, $rest) = split(/\s/, $line);
$rest only contains "FRI" because the line is splitted at every blank. how can
I achieve
that the line ist splitted only at th
Hi,
I'm sure this has been asked before, but I'm having a problem with
understanding "our".
I get the idea of my, and also variable declared without a qualifier is
visible to all packages/modules..also that $package::varname can be used to
access a global variable in another package...
But the
Oops, redirecting to:
[EMAIL PROTECTED]
Jonathan Paton
=
s''-//--/\\///|-\/\|--\--/-\-/\-//\-|/\\\|/\///|-\--',
s''/-\\\/|///|-|/|/--\--/--//\|\/\||/|/-/\\\-/\///|-\-\-',
y'|\/-'3210',$_=join qq\\,map{s|2|10|||s|3|11|||s|^|0|;$_}
m|.|g;map{print chr unpack'N',pack'B32','0'x24 .$_}/.{8}/
> (Please correct me if this is the wrong list for my proposal.)
Treasure Hunt for it:
http://www.cpan.org/
there is one, even if it is [EMAIL PROTECTED]
> I was wonder if it would be possible / usefull to add a hibernation
> functionality to the Perl 6 Language, possibly via a Module.
> (but
on Mon, 03 Jun 2002 17:56:18 GMT, [EMAIL PROTECTED] (Jeremy T. Miller)
wrote:
> So, a folder having these files:
>
> HTTPLogWed 32 kb
> HTTPLogWed1 32 kb
> HTTPLogWed2 32 kb
> HTTPLogWed 42 kb
That's impossible. You cannot have two file with the same name in the
same folder. Furthermore,
on Tue, 04 Jun 2002 07:44:51 GMT, [EMAIL PROTECTED] wrote:
> I am trying to do some cgi scripts for my website, and I keep
> getting the internal error message. If anyone can please help me
> out, contact me and Ill give more details on the problem.
That's not how a mailing list works. Post you
Hello Everyone!
I am trying to do some cgi scripts for my website, and I keep getting the
internal error message. If anyone can please help me out, contact me and Ill
give more details on the problem.
Camilla J. Colburn
CJC Management and Marketing
Business Phone: 1-(256)-386-7175
Email A
94 matches
Mail list logo