On Mon, 24 Jan 2005 10:09:09 +, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Morning
>
> Do anyone know where I can get information on how this module work? I've
> search the Internet nothing so-far.
www.cpan.org would be a good place to start:
http://search.cpan.org/~pmkane/Authen-Smb-0.91
On Thu, 20 Jan 2005 10:45:42 +0530, Anish Kumar K.
<[EMAIL PROTECTED]> wrote:
> Hi
>
> I am new to CGI..I cannot create a file using CGI. I do execute another
> program to create a file, it executes fine..But while using CGI it fails.
>
> I had used a die statement and after that I tried prin
On Tue, 18 Jan 2005 17:04:13 -0600, Jason Balicki
<[EMAIL PROTECTED]> wrote:
> I'm looking for some help with a little project
Unless your going to ask for help with some
actual code you have written, this is better suited
for [EMAIL PROTECTED]
regards
Tor
--
To unsubscribe, e-mail: [EMAIL PRO
On Tue, 18 Jan 2005 15:15:00 +, RichT <[EMAIL PROTECTED]> wrote:
> Grate that worked, the varible must of have a \r and a \n at the end.
> thank you very much...
>
> how would i find our what escape chars are in a varible?
> or is there a way to print out a string with out perl translating th
On Tue, 18 Jan 2005 13:22:14 +, RichT <[EMAIL PROTECTED]> wrote:
> Hi again,
> ok i made the changes sugested, but something is still wrong.
> the output im getting is
> --
> "interface is "ATM0
> "interface is "A
On Tue, 18 Jan 2005 01:08:56 +0100, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> foreach my $line () {
> if ( $line =~ /^[^,]*(?:,[^,]*){10}$/) ) {
> print OUT $line;
> }
> }
>
> That is check whether the full string is "something not containing
> comma followed by ten times comma
On Mon, 17 Jan 2005 14:08:10 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Worked perfectly. I knew it was something simple. Thanks!
>
> Never used POSIX before. Looked at it on cpan but those descriptions can be
> flat sometimes. If you don't mind, what are some practical uses for it? Jus
On Mon, 17 Jan 2005 17:57:28 +, RichT <[EMAIL PROTECTED]> wrote:
> Hi All,
>
>time for me to ask dumb questions again...
>
> I have a script, what i want it to do is scan through a Cisco
> router Config file (nicely saved in a text file already so no need for
> and SNMP), then outpu
Hi,
I have the following code in a script I'm writing:
foreach my $line () {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there is :)
The script will be reused and probably m
On Mon, 17 Jan 2005 14:41:40 +0100, Mauro <[EMAIL PROTECTED]> wrote:
> I'm trying to create a little form usign CGI.pm but I get this error from
> apache:
> malformed header from script. Bad header= checkbox(-name=>'usr',-checked=>1),
> checkbox(-name=>'sys',-checked=>0),
>
On Mon, 17 Jan 2005 16:11:54 +0530, Anish Kumar K.
<[EMAIL PROTECTED]> wrote:
> Hi I need help regarding substituion of varaibles with values
>
> Say I have a txt file (a.txt)
>
> which has only one line:
> Hi $name
Don't think of $name as a perl variable, but as a placeholder. It
looks better i
On Fri, 14 Jan 2005 12:09:03 +0530, Anish Kumar K.
<[EMAIL PROTECTED]> wrote:
> Hi All
>
> I have a hash say. %browserType in which assume there are values...
>
> %browserType=(
> "IE"=>2,
> "NETSCAPE"=>3,
> "FIREFOX"=>5
> );
>
> I need to calculate one morething say percentage utilisation for e
On Wed, 12 Jan 2005 17:27:46 -0700, Dan Fish <[EMAIL PROTECTED]> wrote:
> Are ALL pattern matching variables set back to undef once another m// or
> s/// expression is encountered, even if it contains no parenthized
> expressions?
>
> For example, I would have expected $1 & $2 to be valid in BOTH
On Wed, 12 Jan 2005 08:55:14 +0200, Groleo Marius <[EMAIL PROTECTED]> wrote:
> Hi list! ( as usual )
> i have a simple question : how can i execute an array, knowing that it
> contains perl code?
eval for @array;
Example:
tor% perl -e '@array = ("print \"hi!\n\"", "print \"hello\n\""); eval
for @
On Fri, 17 Dec 2004 15:23:35 +0800, Khairul Azmi <[EMAIL PROTECTED]> wrote:
Hi, start your script with:
#!/usr/bin/perl -w
use strict;
> sub get_conf {
> my $local_file = $_[0];
> my @local_conf;
local_conf is an array. An assosiative array in Perl, is called a hash.
You declear it with
On Tue, 14 Dec 2004 23:10:48 -0800 (PST), Harbhajan Julka
<[EMAIL PROTECTED]> wrote:
> Hey all,
> Need some pointers to perl projects that use all the
> major functionalities of perl. Please pass your ideas
> as soon as you can. I've been working on perl in
> theory and tried some small programs to
On Mon, 13 Dec 2004 14:46:13 -0800 (PST), Christopher Spears
<[EMAIL PROTECTED]> wrote:
> Hi!
>
> Let's say I have a text file filled with:
>
> stuff
> stuff
> stuff
> Users sometext
> tom
> dick
> harry
> Users more sometext
>
On Tue, 14 Dec 2004 11:03:56 +0800, Shu Hung (Koala) <[EMAIL PROTECTED]> wrote:
> Hello,
> I wrote a script which involved writing a file, which may als be writing
> by another script. To prevent crashes, I want to used the flock() function.
>
> my question is:
> How do I check if a file is locked
On Mon, 13 Dec 2004 17:55:12 +0500, Adam Saeed <[EMAIL PROTECTED]> wrote:
> I have written a simple program that should get data from a remote
> database, but it is not working giving error:
> DBI->connect(sugs:192.168.14.2) failed: Host 'www.sample.com' is not
> allowed to connect to this MySQL se
On Sun, 12 Dec 2004 19:32:53 -0600, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Yeah, probably something like that but what else needs to be in there
> to make the example work?
Wild guess:
#!/usr/bin/perl
use IO::Tee;
open($handle1, "file1") or die("No!");
open($handle2, "echo") or die("No2
On Sun, 12 Dec 2004 15:33:44 -0600, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Trying to see something of how it works:
>
> #!/usr/local/bin/perl -w
> use IO::Tee;
> my ($handle1, $handle2);
> $handle1 = "./one"
> $handle2 = "./two"
> $tee = IO::Tee->new($handle1, $handle2);
I have never use
On Wed, 8 Dec 2004 22:49:25 -0800 (PST), Priyanka krishnaraj
<[EMAIL PROTECTED]> wrote:
> Hi All
>
> I want to get the count of rows in paticular table of the oracle database.
You want DBI and DBD::Oracle.
http://www.orafaq.com/faqperl.htm
Tor
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On Wed, 8 Dec 2004 15:26:58 -0500 (EST), Chris Devers <[EMAIL PROTECTED]> wrote:
> On Wed, 8 Dec 2004, Octavian Rasnita wrote:
>
> > So the conclusion is that perl code cannot be really hidden (for
> > comercial purposes)?
>
> For any purposes, yes, code cannot be hidden.
It can be hidden, but i
On Wed, 8 Dec 2004 15:22:39 +0530, Chandrakant Reddy
<[EMAIL PROTECTED]> wrote:
> Hi
>
>I want to replace all occurances of 'and' with '&' in all the given files
In-place with backup in filename.bk:
perl -pi'*.bk' -e 's/\band\b/&/g' filenames
> Here the problem is the files are owned by
perlwannabe wrote:
Now that I have, with all of you helping, dealt with the unlink problem.
I am now faced with a new problem.
I have a file, myfile.txt, that consists of various text items that are
repetitive. I am trying to replace many of the repetitive items with a
place holder. Here is an e
awards wrote:
Hi,
I was reading on the internet someone wanted to do sms with perl and he
couldn't
But my question is simple, can you really send SMS free of charge to
anywhere in the world.
No. You can write up a script that connects to a webpage and
does the sending for you, but you can't physic
<[EMAIL PROTECTED]> wrote:
> I have a file called people.data, which contains two colums:
> jose2
> karen8
> jason9
> tracey1
>
>
> Can someone tell me what I am doing wrong here:
> =
> #! /usr/bin/perl -w
>
> open (INPUT,
<[EMAIL PROTECTED]> wrote:
> #Insert Date and Time
> my $month = $mon00 #Two digit month
> my $day = $mday00 #Two digit day in month
> my $year = $year#Two digit year
??
> my $hour = $hour00 #Two digit: Hour
> my $min = $min00 #Two digit: Minutes
> #Combine date and time above into MMD
<[EMAIL PROTECTED]> wrote:
> I have a string that looks like
>
> Operator Overview#PGM#Report about all configured
> operators#/opt/OV/bin/OpC/call_sqlplus.sh all_oper#
>
> I want to replace the last "#" with a newline. I've come up with a few ideas
> like
>
> substr ($_, rindex ($_, "#"), 1)
<[EMAIL PROTECTED]> wrote:
> Hi
>
> I would like to know how to compare 2 arrays.
>
> I have 2 arrays and I would like to compare the contents of the data.
> It doesn't matter in which order the data is stored so long as its the same.
> So comparing the bellow should read true, but if they didn
> It does save quite a bit of time if you write lots of scripts.
> Especially when you need a quicky to check something in a more
> complex one before adding it.
This is where you would use your one-liners.
I'm pretty sure most people here check syntax etc on a one-liner before they
post a sol
> could puting the entire file into an aray then i think there is a function to
> get the number of elements... then just use that to know what the last
> element would be?
my @array = ;
print "$array[-1]";
Tor
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
> read the filein...
>
> open(FILE, $file) or die "blah blah $!";
> undef $/; ## or local $/ if in a BLOCK
> $contents = ;
> close FILE;
>
> $contents =~ s/\\\n//g; # put everything on one line (deletes \ followed by
> newline)
>
> foreach (split /\n/, $contents){
> ## you can figure this part
> hi,
>
> I simply wished to strip out all the ">" from a text file. below is the
> script and the error that is reported. I cannot see anything wrong, it's
> such a simple piece of code! can any one help, are my eyes deceiving me?
[localhost:~] tor% perl -e 'while(<>) {s/\>//g; print;}'
>>
> Hi guys,
> I'm just looking at Matt's wwwboard.pl and try to figure out what the
> $FORM{somevaule} does.
> It is not declared anywhere before usage.. and I'm quite lost...
>
> If anyone could tell me where to find any information about that, I'd
> be grateful
All though a bit OT, it is normal
> BlankHi everyone,
>
> I need some help for preventing greedy match..I want to get rid of the
> words in paranthesis in the below text. When i use the code below i loose '
> john ' because it matches the last ' )' after recovery.. Is there a easy
> way to avoid this?..
>
>
> $target='michea
> Is there any function to tell if a number is even or odd?
> I am looking for an easy way to loop through a list and
> output table cell bgcolor based on even / odd.
>
> if its an even numbered row make it red if its odd make
> it blue.
>
> I have done it in the past by turning a switch on or o
> From: "Heiko Heggen" <[EMAIL PROTECTED]>
> Date: Wed, 29 May 2002 15:28:17 +0200
> To: "Beginners@Perl. Org" <[EMAIL PROTECTED]>
> Subject: Getting data from console
>
> Hi.
>
> Just another question. How can I get a user input from the console in perl?
> I'm just playing with the DBI Module a
> From: lz <[EMAIL PROTECTED]>
> Date: Tue, 28 May 2002 07:08:52 -0700 (PDT)
> To: [EMAIL PROTECTED]
> Subject: checking for an empty string
>
> Hi guys,
>
> while($line = )
> {
> if ($line =~ /^email address/)
> {
>}
> }
>
> How can I check if $line contains a value or is empty?
chomp
> I define two arrays - one is an active changing file ( @unix = ps -ef ) and
> need to compare it to a static text file @static = `cat myfile`.
>
> Would someone help me on the syntax of greping for @static matches in the
> @unix array.
> I am not sure if I need to assign a variable, for loo
> From: "Taylor Lewick" <[EMAIL PROTECTED]>
> Date: Tue, 21 May 2002 08:00:45 -0500
> To: <[EMAIL PROTECTED]>
> Subject: avoid backticking if at all possible - Re: perl awk question
>
> Thanks drieux, I looked over the code you posted, most of it makes sense, but
> am still a little confused over
Are there any tricks to time the execution of a sub?
Specifically I'm using the Fisher-Yates shuffle, using an array with a
couple of million numbers. I want to time the shuffle.
Tor
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> Hi, I have a file like this:
> ...
> SceInfEveryone = "Everyone"
> SceInfGuests = "Guests"
> SceInfGuest = "Guest"
> SceInfPowerUsers = "Power Users"
> SceInfPrintOp = "Print Operators"
> ..
>
> And I wanted to extract Guest (without the quotes)i tried this:
>
> my $HISEFILE= "c:/h
> From: Francesco Guglielmo <[EMAIL PROTECTED]>
> Date: Tue, 14 May 2002 14:18:18 +0200
> To: David vd Geer Inhuur tbv IPlib <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
> Subject: Re: Split
>
> Many thanks!But to take it from a file and not from a variable like $line?
open FILEHANDLE, /path/file.tx
>
>> Could someone point me to a page that gives information about all the
>> pitfalls that are "available" when running a Perl or CGI script with the
>> suid bit set?
>
:)
> If you really need setuid processes - then one of the
> principle tricks remains to have them 'spawned' from a
> nice
Could someone point me to a page that gives information about all the
pitfalls that are "available" when running a Perl or CGI script with the
suid bit set?
I tried google.com, but couldn't find anything god.
I found this:
http://www-genome.wi.mit.edu/WWW/faqs/wwwsf5.html
But, it's extremely lig
> From: "james" <[EMAIL PROTECTED]>
> Date: Fri, 3 May 2002 08:54:49 -0500
> To: <[EMAIL PROTECTED]>
> Subject: Re: developing and testing first CGI/Perl application
>
> drieux,
>
> i've been monitoring this list and couldn't help but notice the volume of
> your posts. i have to ask: do you ever
> From: Felix Geerinckx <[EMAIL PROTECTED]>
> Date: 2 May 2002 19:32:36 -
> To: [EMAIL PROTECTED]
> Subject: Re: Another MySQL.
>
> on Thu, 02 May 2002 19:10:48 GMT, Tor Hildrum wrote:
>
>> Here is the code:
>> while (@arrangement) {
>> chomp;
&g
> Here is the code:
> while (@arrangement) {
> chomp;
> if ($_ eq $epost) { my $test = 1; }
> shift(@arrangement);
> }
>From another mail written by driuex on the subject:
"is this like some new Kult thing?
It appears that this 'while' construct has popped up on both
the beginner's list and the
Here is the code:
while (@arrangement) {
chomp;
if ($_ eq $epost) { my $test = 1; }
shift(@arrangement);
}
if ($test) {
## Some more Code. The if statement always fails :(
Here is what @arrangement looks like:
@arrangement = qw([EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROT
> From: Felix Geerinckx <[EMAIL PROTECTED]>
> Date: 2 May 2002 17:55:47 -
> To: [EMAIL PROTECTED]
> Subject: Re: MySQL hangs.
>
> on Thu, 02 May 2002 17:08:47 GMT, Tor Hildrum wrote:
>
>> while (@arrangement) {
>> chomp;
>> my $test = 1 if
ut what code is actually getting run - there is better ways,
> but this is a beginners list :)
That is great advice :)
The code again:
#!/usr/bin/perl
use Strict;
use CGI qw(:standard);
use DBI;
my @arrangement;
my $tabell = "Oslo_220602_Vika";
my $navn = "Tor Hildrum";
my
uug
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from Oslo_220602_Vika;
+-+--+
| navn| epost|
+---------+
First of all, I would just like to apologize for not sending this to the
CGI-list, but I prefer this list. As this is where I've gotten the best help
in the past. Blame yourself :)
I was reading CGI.pm when I discovered that you could use the -value
argument from submit buttons, and assign them t
Thanks to everyone who replied.
I got enough information to solve the problem, and then some more :)
Tor
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 8/4/02 9:15, "Tor Hildrum" <[EMAIL PROTECTED]> wrote:
> Here are some of the error messages I get:
> Use of uninitialized value in concatenation (.) at script.cgi line 55.
> Use of uninitialized value in concatenation (.) at script.cgi line 55.
> Can't open
I have the following script:
..my $variable = ""; # Global variable, right?
if (true/false) { sub3(); }
elsif (true/false) { sub2(); }
else { sub1(); }
## The point with this, is that sub1 is always called first, then sub2, then
## sub3. This works perfectly.
sub sub1{
}
sub sub2{
$vari
On 21/3/02 22:23, "Michael Kelly" <[EMAIL PROTECTED]> wrote:
> What do you mean? CGI.pm seems to have a function for generating just about
> every HTML that ever did, does, or will exist. Maybe I'm misunderstanding
> what you mean by "Perl/CGI webpage"...
I'm pretty sure it does, I'm just having
On 21/3/02 15:49, "Trice Dennis D" <[EMAIL PROTECTED]> wrote:
> I'm trying to create a hash of the /etc/group file. I need the key to be
> the group name and just the members of the group to be the key value.
>
> Has anyone done this before?
>
I'm guessing you know how to grab a normal hash f
On 21/3/02 15:04, "David Gray" <[EMAIL PROTECTED]> wrote:
>> I am trying to figure out an easy way to sort out a array of numbers:
>> 2 20 38 56 75 93 -17 -35 -53 -72 -90
>> Into the following:
>> -90 -72 -53 -35 -17 2 20 38 56 75 93
>> I have done the following:
>> @x_step = grep { ! $x_step_
en though there are CGI-lists, I'd rather prefer
to ask on this one(feel honoured :) ).
--
Tor Hildrum.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
#!/usr/bin/perl -w
use strict;
use warnings;
print "What file do you want to open?\n";
chomp(my $openfile = );
print "What file do you want to write to?\n";
chomp(my $outfile = );
print "What do you want to replace in the first file?\n";
chomp(my $pattern = );
print "What do you want to replace i
On 2/3/02 12:06, "Steven M. Klass" <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I know there is a flip flop option but I'm not sure thats what I need..
> Here is what I want to do - and I have no idea how to do this.
>
> Basically I have a section of text that I am doing a search and replace
> opera
> #!/usr/bin/perl
>
> use strict;
>
> my %hash = (
> key1 => 'value 1',
> key2 => 'value 2',
> key3 => 'value 3',
> );
>
> print_hash(\%hash, '=>');
>
> sub print_hash {
> my ($hash, $connector) = @_;
>
> foreach my $key (sort keys %$hash) {
> pri
> The trick is to use {$ref} where you would normally put the variable name:
print "${$rhash}{1}\n"; worked like a charm :)
> So $array[0] becomes ${$ref}[0] (not @$ref[0] which is a "slice").
> And $hash{key} becomes ${ref}{key}.
It seems somewhat inconsistent to me.
While I can dereference s
>> Basically I want to format this so certain keys get printed in a certain
>> order, but there may be some remaining keys that I want printed that I really
>> don't care about. (a "catch-all" if you will)
>>
>> Thanks
>
> print "\n\n**Summary**\n";
> foreach my $key (keys %runset){
> print "N
On 27/2/02 17:33, "Steven M. Klass" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> ok here is the fundamental code
>
> print "\n\n**Summary**\n";
> foreach my $key (keys %runset){
> printf ( "%-20s %-20s\n",$key, $runset{$key});
> }
>
> Now I want to sort this hash for example
> print "\n\n**Summa
Is this a bug or a feature?
Or is it just me? :)
!/usr/bin/perl -w
use strict;
use warnings;
my $variable = "variable";
my @array = qw(this is an array);
my %hash = qw(1 this 2 is 3 a 4 hash); ## correct syntax
my $rvariable = \$variable;
my $rhash = \%hash; ## correct syntax
my $rarray = \@ar
>> On 27/2/02 13:11, "Jon Molin" <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi,
>>
>> I was wondering if any one can help me. Is there any command in perl that
>> will let me match a line only if the next line
>> fufills a certain condition, without doing a double loop over the file?
>> My data is lik
On 27/2/02 13:11, "Jon Molin" <[EMAIL PROTECTED]> wrote:
> Iain Wallace wrote:
>>
>> Hi,
>>
>> I was wondering if any one can help me. Is there any command in perl that
>> will let me match a line only if the next line
>> fufills a certain condition, without doing a double loop over the file?
>
I have 2 questions.
Here is the code:
#!/usr/bin/perl
use warnings;
use strict;
# Merging two files
print ("Write the two files you wan't to merge and \n");
print ("lastly the file to merge them too, seperated by a space.\n");
chop (my $filenames = );
my @names = split(/ /,$filenames); # Get t
71 matches
Mail list logo