Sponsored Content
Top Forums Shell Programming and Scripting Perl regular expressions don't like the @ ("at") sign. Post 302362568 by varontron on Friday 16th of October 2009 01:14:28 PM
Old 10-16-2009
perl is interpolating the @ as an array variable.

Run your script with -w and you'll see a warning like this:

Code:
Possible unintended interpolation of @address in string

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i don't understand the "sort" command

i have been trying to understand this chapter titled "Searching for Files and Text" for a few weeks now. unfortunately, this chapter is one of those things, that no matter how hard you try and how long you try for, you are incapable of understanding (at least in my case) this entire chapter,... (2 Replies)
Discussion started by: xyyz
2 Replies

2. SCO

Plz. don't ignore this mail "Installing Tomcat 4.1.24.zip on Sco Openserver 5.0.2"

Hi Guys, I want ur replies very very Urgently.Plz. don't ignore this mail. I am using Sco openserver 5.0.2 and i have downloaded jdk1.2.2 for that i have installed it.The jdk is working fine. Then i download jakarta-tomcat-4.1.24.zip and i have installed it. In order... (1 Reply)
Discussion started by: ananthu_m
1 Replies

3. UNIX for Advanced & Expert Users

variables don't work for inline "su" script

My first post here... I cannot get variables to work when using inline KSH commands on a "su" command. I have a KSH script, below, that produces my problem: #!/usr/bin/ksh su <user_id> <<-END export FLD1=`echo $PWD` pwd echo $FLD1 echo TEST echo $PWD END The script will prompt me... (3 Replies)
Discussion started by: joekreif
3 Replies

4. Linux

Regular expression to extract "y" from "abc/x.y.z" .... i need regular expression

Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
2 Replies

5. Shell Programming and Scripting

Interesting question - Search and replace the word after sign "="

Hi Guys, Req your help in searching and replacing the word that comes after equals(=) symbol I would like to replace the sting in bold with a string in variable. d=ABCDF8C44C22 # grep -i NIM_MASTERID ${_NIMINFO} export NIM_MASTERID=00CDF8C44C00 I'm looking to replace any word that... (4 Replies)
Discussion started by: ajilesh
4 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Linux

Linux command to find and replace occurance of more than two equal sign with "==" from XML file.

Please help me, wasted hrs:wall:, to find this soulution:- I need a command that will work on file (xml) and replace multiple occurrence (more than 2 times) Examples 1. '===' 2. '====' 3. '=======' should be replaced by just '==' Note :- single character should be replaced. (=... (13 Replies)
Discussion started by: RedRocks!!
13 Replies

8. Shell Programming and Scripting

Filter file by length, looking only at lines that don't begin with ">"

I have a file that stores data in pairs of lines, following this format: line 1: header (preceded by ">") line 2: sequence Example.txt: >seq1 name GATTGATGTTTGAGTTTTGGTTTTT >seq2 name TTTTCTTC I want to filter out the sequences and corresponding headers for all sequences that are less... (2 Replies)
Discussion started by: pathunkathunk
2 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
INTERP(3)						User Contributed Perl Documentation						 INTERP(3)

NAME
PDL::GSL::INTERP - PDL interface to Interpolation routines in GSL DESCRIPTION
This is an interface to the interpolation package present in the GNU Scientific Library. SYNOPSIS
use PDL; use PDL::GSL::INTERP; my $x = sequence(10); my $y = exp($x); my $spl = PDL::GSL::INTERP->init('cspline',$x,$y); my $res = $spl->eval(4.35); $res = $spl->deriv(4.35); $res = $spl->deriv2(4.35); $res = $spl->integ(2.1,7.4); FUNCTIONS
init() The init method initializes a new instance of INTERP. It needs as input an interpolation type and two piddles holding the x and y values to be interpolated. The GSL routines require that x be monotonically increasing and a quicksort is performed by default to ensure that. You can skip the quicksort by passing the option {Sort => 0}. The available interpolation types are : o linear o polynomial o cspline (natural cubic spline) o cspline_periodic (periodic cubic spline) o akima (natural akima spline) o akima_periodic (periodic akima spline) Please check the GSL documentation for more information. Usage: $blessed_ref = PDL::GSL::INTERP->init($interp_method,$x,$y,$opt); Example: $x = sequence(10); $y = exp($x); $spl = PDL::GSL::INTERP->init('cspline',$x,$y) $spl = PDL::GSL::INTERP->init('cspline',$x,$y,{Sort => 1}) #same as above # no sorting done on x, user is certain that x is monotonically increasing $spl = PDL::GSL::INTERP->init('cspline',$x,$y,{Sort => 0}); eval() The function eval returns the interpolating function at a given point. By default it will barf if you try to extrapolate, to comply silently if the point to be evaluated is out of range pass the option {Extrapolate => 1} Usage: $result = $spl->eval($points,$opt); Example: my $res = $spl->eval($x) $res = $spl->eval($x,{Extrapolate => 0}) #same as above # silently comply if $x is out of range $res = $spl->eval($x,{Extrapolate => 1}) deriv() The deriv function returns the derivative of the interpolating function at a given point. By default it will barf if you try to extrapolate, to comply silently if the point to be evaluated is out of range pass the option {Extrapolate => 1} Usage: $result = $spl->deriv($points,$opt); Example: my $res = $spl->deriv($x) $res = $spl->deriv($x,{Extrapolate => 0}) #same as above # silently comply if $x is out of range $res = $spl->deriv($x,{Extrapolate => 1}) deriv2() The deriv2 function returns the second derivative of the interpolating function at a given point. By default it will barf if you try to extrapolate, to comply silently if the point to be evaluated is out of range pass the option {Extrapolate => 1} Usage: $result = $spl->deriv2($points,$opt); Example: my $res = $spl->deriv2($x) $res = $spl->deriv2($x,{Extrapolate => 0}) #same as above # silently comply if $x is out of range $res = $spl->deriv2($x,{Extrapolate => 1}) integ() The integ function returns the integral of the interpolating function between two points. By default it will barf if you try to extrapolate, to comply silently if one of the integration limits is out of range pass the option {Extrapolate => 1} Usage: $result = $spl->integ($a,$b,$opt); Example: my $res = $spl->integ($a,$b) $res = $spl->integ($a,$b,{Extrapolate => 0}) #same as above # silently comply if $a or $b are out of range $res = $spl->eval($a,$b,{Extrapolate => 1}) BUGS
Feedback is welcome. SEE ALSO
PDL The GSL documentation is online at http://sources.redhat.com/gsl/ref/gsl-ref_toc.html AUTHOR
This file copyright (C) 2003 Andres Jordan <andresj@physics.rutgers.edu> All rights reserved. There is no warranty. You are allowed to redistribute this software/documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file. The GSL interpolation module was written by Gerard Jungman. perl v5.12.1 2010-07-05 INTERP(3)
All times are GMT -4. The time now is 07:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy