The English of what I want to do is "If this remote value is not
defined, then skip over it and proceed on to the next entry in the
list."
I want to avoid an error is the key doesn't exist. Every variation of IF
EXISTS I use doesn't work correctly. Is there something obvious I am
missing?
Hi
I created a script that reads a file and attaches a string infront of each read in
item. When the file is saved with the changes though, each item has a blank line
between the next item. The original text document does is single sapced.
Original tesxt file
item1
item2
item3
Saved text fil
The English of what I want to do is "If this remote value is not
defined, then skip over it and proceed on to the next entry in the
list."
I want to avoid an error is the key doesn't exist. Every variation of IF
EXISTS I use doesn't work correctly. Is there something obvious I am
missing?
Thanks George, I thought that was something I had in earlier that I had
accidentally deleted...I took your advice though and stuck that html header
in there after the shebang and just before I printed out any html.
Unfortunately your suggestion didn't fix the problem. The hosting company
I'm work
On Friday 07 Feb 2003 5:04 am, Fromm, Marc wrote:
> Hi
>
> I created a script that reads a file and attaches a string infront of each
> read in item. When the file is saved with the changes though, each item
> has a blank line between the next item. The original text document does is
> single sap
On Fri, 07 Feb 2003 00:13:47 -0800, Paul Harwood wrote:
> The English of what I want to do is "If this remote value is not
> defined, then skip over it and proceed on to the next entry in the
> list."
The canonical ways to do it are either
foreach my $item (@list) {
next unless defined $item
Hi all,
i need to execute a C executable on a remote system from mine and get
the results(like output files etc) back on to my system. how do i do this
with perl ? which module do i need to use?
enlighten me --
KM
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai
Hi,
When I execute a dos command with system() in perl5.4 (djgpp dos
version) it is not working. Can any one please help in executing the dos
commands in perl.
Regards,
Ganesh
--
N. Ganesh Babu
Asst. Production Manager
Apex Logical Dataconversion Pvt. Ltd.
303 & 304 M.G.R. Estate
Dwarakapuri C
Net::Telnet module is probably the starting place ...
http://search.cpan.org/author/JROGERS/Net-Telnet-3.03/lib/Net/Telnet.pm#SYNOPSIS
HTH,
José.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 07, 2003 10:05 AM
> To: [EMAIL PROTECTED]
Sashidhar wrote:
> I may have to change the length of the files. Is there no way, like
> manipulating the inode entries to reflect any changes in the length.
> Ofcourse, I realize that this is specific to the linux/unix env.
>
The problem is a limitation of the filing system itself. The starting
p
R. Joseph Newton wrote:
> Rob Dixon wrote:
>>
>> print my $t="href=\"(.*?)\">";
>> outputs
>> href="(.*?)">
>
> H. this gets me thinking. How does that translate into a regex
> when such a variable is passed in? Would Perl do the escaping and
> feed the regex something like:
>
> /hre
N. Ganesh Babu wrote:
> Hi,
>
> When I execute a dos command with system() in perl5.4 (djgpp dos
> version) it is not working. Can any one please help in executing the
> dos commands in perl.
Hi Ganesh.
You should be able to say simply:
my $result = system ("command");
but without knowing w
Hi all,
Is there a way of using perl's amazing
pattern-matching skills within VB???I find using VB to
query txt files, etc to be more cumbersome and less
friendly than perl's...I was wondering whether anyone
had been able to utilize perl from within VB, and if
so, how?
I'm presuming using a perl
Searching from google gives one the following :
http://sources.redhat.com/ml/cygwin/2000-07/msg00975.html
The seach : http://www.google.be/search?q=Perl+in+VB&ie=UTF-8&oe=UTF-8&hl=nl&meta=
HTH,
José.
> -Original Message-
> From: Ben Crane [mailto:[EMAIL PROTECTED]]
> Sent: Friday, Febr
From: Ben Crane <[EMAIL PROTECTED]>
> Is there a way of using perl's amazing
> pattern-matching skills within VB???I find using VB to
> query txt files, etc to be more cumbersome and less
> friendly than perl's...I was wondering whether anyone
> had been able to utilize perl from within VB, and if
>
>
> Thanks George, I thought that was something I had in earlier
> that I had accidentally deleted...I took your advice though
> and stuck that html header in there after the shebang and
> just before I printed out any html. Unfortunately your
> suggestion didn't fix the problem. The h
> The English of what I want to do is "If this remote value is
> not defined, then skip over it and proceed on to the next
> entry in the list."
>
>
>
> I want to avoid an error is the key doesn't exist. Every
> variation of IF EXISTS I use doesn't work correctly. Is there
> something obvio
Hello all,
Has any body done this/know how to dit/know if it's even possible??
__SHORT VERSION__
How do I / Is it possible to -- use Net::FTP to send a file to a remote server that
isn't an actual file but rather a variable with the file's contents?
EG ::
$ftp->("$html_code","newfile.html")
I'm trying to read the last line on a Plain text File.
But when I use:
open (DATOS, "$bd") || die "Error: no se puede abrir el archivo";
while
ATOS>){
$registro = ;
}
I don't get any value on $registro
I need to insert $inicio = ; --
This way to get the the las
Is there a way to use perl to change nt password. If so could some tell
me how to do it.
Thomas
Sorry.
Last message had an error.
--
I'm trying to read the last line on a Plain text File.
But when I use:
open (DATOS, "$bd") || die "Error: no se puede abrir el archivo";
while
ATOS>){
$registro = ;
}
I don't get any value on $registro
I ne
The "while()" is pulling a line, as well as the "$registro =
".
while () { # reads a line into $_
$registro = ; # reads a SECOND line
}
My guess is that the while() is reading the last line of the file, leaving
nothing for $registro.
Use this instead (although there is probably a more efficie
Ramón Chávez wrote:
> I'm trying to read the last line on a Plain text File.
>
> But when I use:
>
> open (DATOS, "$bd") || die "Error: no se puede abrir el archivo";
> while
> ATOS>){
> $registro = ;
> }
>
> I don't get any value on $registro
>
> I need to insert $ini
On Fri, 7 Feb 2003 10:32:12 -0600, "Dan Muey" <[EMAIL PROTECTED]> wrote:
> Hello all,
> Has any body done this/know how to dit/know if it's even possible??
>
>
> __SHORT VERSION__
> How do I / Is it possible to -- use Net::FTP to send a file to
Thank you very much guys.
Rob, sorry but it didn't work
open (DATOS, "$bd") || die "Error: no se puede abrir el
archivo";
while ($registro=) {}
($file, $vot_tot, $ult_vot, $sum_vot) = split(/:/,$registro);
$lineas = $.;
close (DATOS);
>
> On Fri, 7 Feb 2003 10:32:12 -0600, "Dan Muey"
> <[EMAIL PROTECTED]> wrote:
>
> > Hello all,
> > Has any body done this/know how to dit/know if it's even possible??
> >
> >
> > __SHORT VERSION__
> > How do I / Is it possible to -- use Net:
On Fri, 7 Feb 2003 12:39:14 -0600, "Dan Muey" <[EMAIL PROTECTED]> wrote:
> > > Any ideas/different modules/etc..
> > >
> >
> > Though my understanding may not be complete, and it would
> > take two scripts and may not be portable off of *nix s
Hi all
I've started composing this script but seem to be a
little stuck at the moment ..when I run script as it
is presntly these errors occur..Name "main::alt_nick"
used only once: possible typo at maria.pl line 26.
Name "main::awaytime" used only once: possible typo at
maria.pl line 28.
Name "ma
Dan Muey wrote:
> Hello all,
> Has any body done this/know how to dit/know if it's even possible??
>
>
> __SHORT VERSION__
> How do I / Is it possible to -- use Net::FTP to send a file to a
> remote server that isn't an actual file but rather a variable with
> the file's contents?
>
> EG ::
> $ftp-
Rgíón «hávkú wrote:
> I'm trying to read the last line on a Plain text File.
The following was so well written by John I think it's worth
repeating. Thanks John!
John W. Krahn wrote:
>
> 1) Install http://search.cpan.org/author/URI/File-ReadBackwards-0.98/
>
> use File::ReadBackwards;
> my $bw =
> > I'm trying to read the last line on a Plain text File.
>
> The following was so well written by John I think it's worth
> repeating. Thanks John!
Absolutely. This should be made into a FAQ !! (or is there one already?)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional command
G.D. Bell wrote:
> Hi all
>
> I've started composing this script but seem to be a
> little stuck at the moment ..when I run script as it
> is presntly these errors occur..Name "main::alt_nick"
> used only once: possible typo at maria.pl line 26.
> Name "main::awaytime" used only once: possible typo
on vr, 07 feb 2003 16:50:08 GMT, Thomas Browner wrote:
> Is there a way to use perl to change nt password. If so could some tell
> me how to do it.
See
http://www.roth.net/perl/adminmisc/#SetPassword
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [
On Fri, 7 Feb 2003 13:53:03 -0500 (EST), "G.D. Bell" <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I've started composing this script but seem to be a
> little stuck at the moment ..when I run script as it
> is presntly these errors occur..Name "main::a
>
> Dan Muey wrote:
> > Hello all,
> > Has any body done this/know how to dit/know if it's even possible??
> >
> >
> > __SHORT VERSION__
> > How do I / Is it possible to -- use Net::FTP to send a file to a
> > remote server that isn't an actual file but rather a
> variable with the
> > file's
Just out of curiousity, I assume your script sends a message back to the sender asking
for verification / an away message.
How do you incorporate IRC into it?
What is it's overall function?
Just curious because I've been wanting to do something similar but the IRC thing
sounded interesting.
D
I inherited this script, whose code is as follows:
#!/usr/local/bin/perl -w
...
# 'while' starts on line 42
while (($app_key, $app_value) = each %app_file_count) {
delete ($app_file_count{$app_key});e
}
What is the "hanging 'e' on line 43? It is not a subroutine call, and ther
>
> I inherited this script, whose code is as follows:
>
> #!/usr/local/bin/perl -w
> ...
> # 'while' starts on line 42
> while (($app_key, $app_value) = each %app_file_count) {
> delete ($app_file_count{$app_key});e
It's the letter 'e' after the ; in the line above.
> }
>
Hi All,
I swear I've called subroutines this way before, but I can't find any
examples.
In this case, I'm looking to build some time/date functions. Regardless of
what the actual code is supposed to do, the calling of subroutines as
elements of a hash is causing me grief. I am receiving the foll
Jeff Westman wrote:
> I inherited this script, whose code is as follows:
>
> #!/usr/local/bin/perl -w
> ...
> # 'while' starts on line 42
> while (($app_key, $app_value) = each %app_file_count) {
> delete ($app_file_count{$app_key});e
> }
>
> What is the "hanging 'e' on line 43?
Jeff Westman wrote:
>
> I inherited this script, whose code is as follows:
>
> #!/usr/local/bin/perl -w
> ...
> # 'while' starts on line 42
> while (($app_key, $app_value) = each %app_file_count) {
> delete ($app_file_count{$app_key});e
> }
>
> What is the "hanging 'e' on line
Peter Farrar wrote:
>
> Hi All,
>
> I swear I've called subroutines this way before, but I can't find any
> examples.
> In this case, I'm looking to build some time/date functions. Regardless of
> what the actual code is supposed to do, the calling of subroutines as
> elements of a hash is causi
Jeff Westman wrote:
> I inherited this script, whose code is as follows:
>
> #!/usr/local/bin/perl -w
> ...
> # 'while' starts on line 42
> while (($app_key, $app_value) = each %app_file_count) {
> delete ($app_file_count{$app_key});e
> }
>
> What is the "hanging 'e' on line 43?
Is there away for perl enter an variable from the command line.
For example:
./test.pl tom
Thomas Browner
On Fri, 7 Feb 2003 15:04:16 -0600, "Thomas Browner" <[EMAIL PROTECTED]>
wrote:
> Is there away for perl enter an variable from the command line.
>
> For example:
>
> ./test.pl tom
>
perldoc perlvar (I think)
Input on the command line is aut
Yes, with $ARGV[0]. The number is the variable postion. 0 is the first.
#!/usr/bin/perl
$name = $ARGV[0];
print "Hello, $name!\n";
-Jose
- Original Message -
From: "Thomas Browner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 07, 2003 2:04 PM
Subject: variable fro
From: "John W. Krahn" <[EMAIL PROTECTED]>
> Peter Farrar wrote:
> > I swear I've called subroutines this way before, but I can't find
> > any examples. In this case, I'm looking to build some time/date
> > functions. Regardless of what the actual code is supposed to do,
> > the calling of subrouti
Bob-
This was extremely useful. Thanks for the tips.
Regards,
Jeff
--- Bob Showalter <[EMAIL PROTECTED]> wrote:
> Jeff Westman wrote:
> > I inherited this script, whose code is as follows:
> >
> > #!/usr/local/bin/perl -w
> > ...
> > # 'while' starts on line 42
> > while (($app_key, $ap
Thomas Browner wrote:
> Is there away for perl enter an variable from the command line.
>
> For example:
>
> ./test.pl tom
>
>
>
>
>
> Thomas Browner
You have a number of options, but @ARGV holds what comes from the
command line. $ARGV[0] holds item 1, $ARGV[1] holds item 2, etc.
Hi,
We are doing file operations on large files(more
than 5GB).
basically reading the file and validatiing the each
record in in the file.
we used Tie::File
It took 35 min to read and count the number of lines
in file of 8millions (500MB)
following is the script
Does anybody have a
Peter Farrar wrote:
> Hi All,
>
> I swear I've called subroutines this way before, but I can't find any
> examples.
> In this case, I'm looking to build some time/date functions.
> Regardless of what the actual code is supposed to do, the calling of
> subroutines as elements of a hash is causing me
Madhu Reddy wrote:
> Hi,
> We are doing file operations on large files(more
> than 5GB).
> basically reading the file and validatiing the each
> record in in the file.
>
> we used Tie::File
> It took 35 min to read and count the number of lines
> in file of 8millions (500MB)
>
> following
Peter
I saw Jenda's note and I suggest the code needs simplification.
> P.S. you can see where I comment out the ccyymmdd_now function. That
> approach works, but is not what I'm shooting for.
>
> %date_formats = (
> # "ccyymmdd" => {now => \ccyymmdd_now()},
> "ccyymmdd" => {now => s
Peter,
#!/usr/bin/perl -w
use strict;
my %date_formats = (
ccyymmdd => { now => sub {
my @arr = localtime();
print 'Year ', 1900 + $arr[5] . ' Month '. sprintf("%02d",$arr[4] + 1)
. ' Day ' . sprintf("%02d",$arr[3]);
}
} );
& { $date_formats{ccyymmdd}{now} };
Same output as previous
"Fromm, Marc" wrote:
> Hi
>
> I created a script that reads a file and attaches a string infront of each read in
>item. When the file is saved with the changes though, each item has a blank line
>between the next item. The original text document does is single sapced.
>
> Original tesxt file
>
Ben Crane wrote:
> Hi all,
>
> Is there a way of using perl's amazing
> pattern-matching skills within VB???I find using VB to
> query txt files, etc to be more cumbersome and less
> friendly than perl's.
I'm not sure about regexes, but I know that VB has the split function. It looks from
MSDN
Samuel Mauntz wrote:
> Thanks George, I thought that was something I had in earlier that I had
> accidentally deleted...I took your advice though and stuck that html header
> in there after the shebang...
Now try printing the content header BEFORE the shebang. Consider--when you are
accessing
Ramón Chávez wrote:
> Thank you very much guys.
>
> Rob, sorry but it didn't work
>
> open (DATOS, "$bd") || die "Error: no se puede abrir el
> archivo";
>
> while ($registro=) {}
Hi Ramon,
The empty brackets in the line above were meant to represent the whole body of the
"G.D. Bell" wrote:
> # Variables
> $alt_nick = "set_alt_nick";
> ...
> # Away Functions
> IRC::add_command_handler("gbell72", set_alt_nick);
> IRC::add_command_handler("gbell72|afk", set_alt_nick);
So what is going on here? I see a bareword being offered to a function. This seems
to me that it
59 matches
Mail list logo