Re: Regex for date

2018-08-25 Thread Jim Gibson
regex to match the date : Sat Aug 25 08:41:03 2018 and > covert into a format : '%m/%d/%Y %H:%M:%S' > > Thanks, > > -- > Asad Hasan > +91 9582111698 Jim Gibson -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: help with a stat script

2018-07-12 Thread Jim Gibson
> On Jul 12, 2018, at 5:50 AM, Lauren C. wrote: > > thanks for the kind helps. > do you know what the expression in { } stands for? > > ^(\S+) - - \[(\S+).*\] \"GET (.*?/)\s+ Here is a breakdown: ^ Start looking for matches at beginning of string (\S+) Match a consecutive

Re: How to compare timestamp in two different files

2018-10-22 Thread Jim Gibson
On Oct 22, 2018, at 9:12 PM, Asad wrote: > > file1 : > Patching tool version 12.1.0.2.0 Production on Fri Feb 23 01:10:28 2018 > > Bootstrapping registry and package to current versions...done > statement ERR-2001: table is corrupt check for cause > > could not determine the current status. >

Re: sftp code to use

2018-10-21 Thread Jim Gibson
helpful > > > sftp u...@xyx.com 1212 > pasword:xxx > cd /patch1 > get patch1.zip > unzip patch1.zip > sqlplus / as sysdba ===> connect to oracle database > sql>startup > > > Thanks, > > -- > Asad Hasan > +91 9582111698 Jim Gibson -- To unsub

Re: How to compare timestamp in two different files(regex)

2018-10-24 Thread Jim Gibson
or each line is the file, use a regular expression to look for lines starting with ‘LOG file opened at’ and extract the time that follows in that line. Then, use Time::Piece to create an object of that class using the date/time extracted. Then, you can compare the time in that line to your start and stop times in $t2 and $t3 (or is it $t1 and $t3?). Jim Gibson -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: use Time::Piece

2018-10-31 Thread Jim Gibson
On Oct 31, 2018, at 1:29 PM, Martin McCormick wrote: > > > I'd like to say that it's working but not yet. There seems to be > nothing wrong with the string now. > > my $t1 = Time::Piece->strptime("$obtime[1], %d %b %Y %H:%M:%S %z”); strptime is a method with two arguments: string to be

Re: How to compare timestamp in two different files(regex)

2018-10-25 Thread Jim Gibson
1 and t3 from file2 > > > > Please advice , > > > > thanks, > > For each line is the file, use a regular expression to look for lines > starting with ‘LOG file opened at’ and extract the time that follows in that > line. Then, use Time::Piece to create an object of

Re: Syntax "||" before sub

2018-11-24 Thread Jim Gibson
> On Nov 24, 2018, at 12:49 PM, David Precious wrote: > > I went to perldoc perlop expecting to be able to find a > section to point the OP at as a "here's the documentation for it", and > couldn't find anything particularly useful. I was able to find this in “perldoc perlop”: Assignment

Re: Code Assistance Pls

2018-11-21 Thread Jim Gibson
> On Nov 21, 2018, at 3:08 AM, Amanda Paziuk wrote: > > Folks, > > I'm hoping someone can assist as I'm having difficulty with parsing a section > of the following configuration: > > This is the code I have: > > open (IN, $file); # only sharing this because you need to know where >

Re: reading text data to variable

2018-12-28 Thread Jim Gibson
gt; For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ Jim Gibson jimsgib...@gmail.com -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5

2019-09-08 Thread Jim Gibson
don't know what you expect it to do. > I expect it to return a positive value if $t contains a number anywhere within it and put that number in the $1 capture variable. > > Mike > > > On 9/8/2019 4:34 PM, Jim Gibson wrote: >> On Sep 8, 2019, at 1:30 PM, Gautam Desai >&

Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5

2019-09-08 Thread Jim Gibson
> On Sep 8, 2019, at 6:36 PM, Olivier wrote: > > Jim Gibson writes: > >> On Sep 8, 2019, at 3:39 PM, Mike wrote: >>> >>> >>> It's probably best if you write a short script >>> that reads a __DATA__ section of data. >>&g

Re: Hi Folks : I'm trying to create a regular expression for finding a # wishing a dataset for only a number that is a multiple of 5

2019-09-08 Thread Jim Gibson
On Sep 8, 2019, at 1:30 PM, Gautam Desai wrote: > > Do you guys have any pointers ? $t =~ m{ ( # capture matched number in $1 \d* # match zero or more decimal digits [05] # followed by a '0' or '5' )

Re: perl script with wrong

2019-10-13 Thread Jim Gibson
} > } else { > $hash{$id} = $line; > } > } > > my @val = values %hash; > print OUT "@val\n"; > > close OUT; > close IN; > } > > > > > > -- > Hunan Normal University, Changsha, China:Dong Liu > > 格言:积土而为山,积水而为海; > 知识在于积累,成功在于勤奋。 > > > Jim Gibson j...@gibson.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: regex help - only one value returned

2020-12-02 Thread Jim Gibson
match with capturing in another variable. The capturing variables $1, $2, etc. are not reassigned if a match fails, so if you use them after a failed match, they will be the values left over from a previous match. So do this: my $salutation = $1; my $name = $2; If you don’t want a possible

Re: use string in "use"

2020-12-14 Thread Jim Gibson
uot; and pass a path. I understand that > require is run time, while use is compile time. Are there any down-sides to > using require? > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http:/

Re: Varnish module configuration

2020-11-15 Thread Jim Gibson
> On Nov 15, 2020, at 2:42 AM, Marco Shaw wrote: > > https://metacpan.org/source/RCL/Varnish-CLI-0.03/lib%2FVarnish%2FCLI.pm > > I don't know if I'm doing something wrong. I'm trying to use this CLI > against an upgraded Varnish server and it seems the new version is built with > a secret

Re: Can use perl for download photos from facebook?

2022-03-19 Thread Jim Gibson
Check out the LWP library of modules on CPAN: <https://metacpan.org/pod/LWP> > On Mar 19, 2022, at 6:07 AM, William Torrez Corea > wrote: > > I have an idea from the program but I don't know where to start. > Jim Gibson -- To unsubscribe, e-mail: beginners

Re: Can use perl for download photos from facebook?

2022-03-20 Thread Jim Gibson
t/v/t39.30808-1/274490608_3202483196693292_7724900589789523726_n.jpg ... Jim Gibson -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Can use perl for download photos from facebook?

2022-03-20 Thread Jim Gibson
to a gist and share it here? >> >> On Sat, Mar 19, 2022 at 8:48 PM William Torrez Corea >> wrote: >> I have a short code: >> >> #!/usr/bin/perl; >> @ARGV = ("Facebook.html"); >> while(<>){ >> while(/(http[a-z\-\.0-9:\/]*\w*)

Re: help with making an sftp connection

2023-04-16 Thread Jim Gibson via beginners
ng than informative, so I'm not sure how to best > do this. > > It looks like Net::SFTP::Foreign might best fit my needs, but I'm open to > suggestions. > > > Advice or a code snippet on how to make the connection should be enough, and > much appreciated!! > > > > Th

Re: A Regular Expression Problem in Perl 5.28

2023-03-29 Thread Jim Gibson via beginners
quot;n" times, but not more than "m" times. Jim Gibson j...@gibson.org -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: https://metacpan.org/pod/OpenOffice::OODoc

2024-01-28 Thread Jim Gibson via beginners
or something similar to Excel::Writer::XLSX, mainly to > automatically export database tables to spreadsheets from perl > programs in ods format rather than in xlsx format. > > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: begi

<    3   4   5   6   7   8