I have a below line in file '/data/control.dat'..
migration.MW051 52013/nm16,CDW
I want to fetch only migration.MW051 52013/nm16
Below is the code, But it is fetching full line. Can you help on this.
migration.MW051 52013/nm16,CDW
I want to fetch only migration.MW051 52013/nm16
Below is the code, But it is fetching full line. Can you help on this.
Code:
$CONTROL_FILE=/data/control.dat open (CONTROL_FILE, "<$CONTROL_FILE") or handle_error(open_control_file); while ( $ENTRY = <CONTROL_FILE> ) { if ( $ENTRY =~ /^(.*?)\s/ ) {
Comment